API v2 Reference

The MyPayIndia API v2 uses session-based authentication via Bearer tokens. All requests and responses are JSON. If you have a question or issue, ask in #dev on our Discord.

Conventions

Authentication

Log in viaPOST /api/v2/auth/login to receive a session ID. Pass it as Authorization: Bearer <session_id> on all authenticated requests.
(You will still get a cookie from this endpoint, like in v1, and can use it instead if you want)

Money

All amounts are integers in paisa
100 = 1.00 INR
10000 = 100.00 INR

Timestamps

All timestamps are ISO 8601 with UTC offset
2026-05-05T14:30:00+00:00

Response Shape

Success:{"success": true, "data": { ... }}
Error: {"success": false, "error": 1001, "message": "..."}

Error Codes

Error codes identify the error type. Themessage field is human readable but should not be parsed programatically as it can change over time.

Maintenance Mode

Any endpoint may return503 with error code 9003 during maintenenace mode.

Authentication

POST /api/v2/auth/login Public

Authenticate and receive a session ID.

Request Body

ParameterTypeDescription
usernamestring requiredUsername or email address
passwordstring requiredAccount password
totp_codestring optionalTOTP authenticator code (required if 2FA is enabled)

Response

{
    "success": true,
    "data": {
        "session_id": "a1b2c3d4e5f6...",
        "user": {
            "id": 123,
            "username": "johnpayment",
            "role": "user"
        }
    }
}

Errors

CodeHTTPDescription
1005401Invalid username/email or password
10024012FA code required but not provided
1010401Invalid 2FA code
1003403Account is suspended
1016403Password sign-in is turned off, so the app must update and use /api/v2/auth/oauth
On success, use the returned session_id as Authorization: Bearer <session_id> on all authenticated requests.
POST /api/v2/auth/oauth Public

Authenticate using a MyPayIndia Identity access token to receive a session ID. The app needs full account access turned on in its developer settings.

Request Body

ParameterTypeDescription
access_tokenstring requiredAccess token from /oauth/token with a granted session scope

Response

{
    "success": true,
    "data": {
        "session_id": "a1b2c3d4e5f6...",
        "user": {
            "id": 123,
            "username": "johnpayment",
            "role": "user"
        }
    }
}

Errors

CodeHTTPDescription
1008400No access token was sent
1006401The access token is unknown, expired, revoked or already exchanged
1014403The token lacks the session scope, or its app may not create sessions: full account access is off or paused, the app is disabled, or the app is unreviewed and the user is not its developer
1003403Account is suspended
Send the access token in the body, not the Authorization header. Each access token can be exchanged once. The returned session_id is identical to the one you'd get from /api/v2/auth/login.
POST /api/v2/auth/qr/scan Authenticated

Scan a QR login code shown on another device and get the details of the device asking to log in.

Request Body

ParameterTypeDescription
tokenstring requiredThe scanned QR code contents, either the full mpi-login:v1:... text or the token after the prefix

Response

{
    "success": true,
    "data": {
        "token": "Zk3v9Q...",
        "requester": {
            "device": "Windows",
            "ip": "1.50.100.200",
            "location": "Mumbai, Maharashtra, India",
            "requested_at": "Monday, October 26th, 2026 2:05:00 PM"
        }
    }
}

Errors

CodeHTTPDescription
9004400Missing token, or the code is not a MyPayIndia login code
1001401Not authenticated
1014403The session belongs to a third-party app, which cannot approve logins
9005404The code is unknown, expired or already scanned
9006429Too many scans in a short time
Only accept codes that start with mpi-login:v1:. After scanning, the other device shows the account name and waits. Show the user the requester details together with a warning to approve only if they are logging in on a screen in front of them, then call /api/v2/auth/qr/approve or /api/v2/auth/qr/deny. A code expires two minutes after it was shown.
POST /api/v2/auth/qr/approve Authenticated

Approve a scanned QR login, logging the other device into this account.

Request Body

ParameterTypeDescription
tokenstring requiredThe token returned by /api/v2/auth/qr/scan
totp_codestring optionalTOTP authenticator code (required if 2FA is enabled)

Response

{
    "success": true
}

Errors

CodeHTTPDescription
9004400Missing or malformed token
1001401Not authenticated
10024012FA code required but not provided
1010401Invalid 2FA code
1014403The session belongs to a third-party app, which cannot approve logins
9005404The code expired, or was not scanned by this session
9005410The device showing the code cancelled the login, so nothing was approved
9006429Too many 2FA attempts
Must be called from the same session that scanned the code.
POST /api/v2/auth/qr/deny Authenticated

Deny a scanned QR login. The other device shows that the login was denied.

Request Body

ParameterTypeDescription
tokenstring requiredThe token returned by /api/v2/auth/qr/scan

Response

{
    "success": true
}

Errors

CodeHTTPDescription
9004400Missing or malformed token
1001401Not authenticated
9005404The code expired, or was not scanned by this session
9005410The device showing the code cancelled the login, so nothing was approved
Must be called from the same session that scanned the code.

User

GET /api/v2/user/info Authenticated

Get profile and balance information for the authenticated user.

Response

{
    "success": true,
    "data": {
        "id": 11,
        "username": "johnpayment",
        "first_name": "John",
        "last_name": "Payment",
        "email": "[email protected]",
        "balance": 1234500,
        "role": "user",
        "created": "2025-12-01T12:05:00+00:00",
        "mfa_enabled": true
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
Balance is returned in paisa. Divide by 100 for display. Make sure it always has exactly two decimal points. NOTE: The date_of_birth field is no longer used and therefore not shown in the example response, but still exists in the actual response to prevent apps from crashing, and will always return null.
GET /api/v2/user/restrictions Authenticated

Get active restrictions on the authenticated user's account.

Response

{
    "success": true,
    "data": {
        "restrictions": {
            "frozen": {
                "active": true,
                "value": null,
                "expires_at": "2026-06-01T00:00:00+00:00",
                "label": "Account Frozen",
                "description": "You cannot receive or send funds."
            }
        },
        "restrictions_list": [
            {
                "id": "frozen",
                "active": true,
                "value": null,
                "expires_at": "2026-06-01T00:00:00+00:00",
                "label": "Account Frozen",
                "description": "You cannot receive or send funds."
            }
        ]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
restrictions and restrictions_list carry the same restrictions in two shapes: an object keyed by restriction id, and an array where the id is a field. Pick whichever suits your client. With no active restrictions, restrictions is {} and restrictions_list is []. label is a short title for the restriction and description a sentence explaining it.
GET /api/v2/user/session/list Authenticated

List active and recently invalidated sessions for the authenticated user.

Response

{
    "success": true,
    "data": {
        "sessions": [
            {
                "id": "a1b2c3...",
                "device_info": "macOS",
                "ip": "1.50.100.200",
                "created_at": "2026-05-01T10:00:00+00:00",
                "last_active": "2026-05-05T14:30:00+00:00",
                "invalidated": false,
                "invalidated_at": null,
                "current": true,
                "login_method": null,
                "oauth_app": {
                    "id": "9d3f2a1e-5b7c-4e8a-a6f0-1c2d3e4f5a6b",
                    "name": "MyPayIndia 2"
                }
            }
        ]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
When oauth_app is not null, the session was initiated and is most likely being used by the app. login_method is "qr" for sessions started by approving a QR code, "password" for website logins, and null otherwise.
POST /api/v2/user/session/invalidate Authenticated

Invalidate (log out) a specific session.

Request Body

ParameterTypeDescription
session_idstring requiredThe session ID to invalidate

Response

{
    "success": true
}

Errors

CodeHTTPDescription
9004400Invalid input or missing session_id
1001401Not authenticated
9005404Session not found or already invalidated
POST /api/v2/user/verify-email Authenticated

Send a verification email to the authenticated user's email address.

Response

{
    "success": true
}

Errors

CodeHTTPDescription
1013400Email already verified
1001401Not authenticated
9006429Rate limited (60 second cooldown)

Transactions

POST /api/v2/transaction/transfer Authenticated

Transfer funds to another user.

Request Body

ParameterTypeDescription
recipientstring|integer requiredRecipient username or user ID
amountinteger requiredAmount in paisa
notestring optionalOptional transfer note

Response

{
    "success": true,
    "data": {
        "transaction_id": "TXN-1234567890-09af",
        "status": "confirmed"
    }
}

Errors

CodeHTTPDescription
9004400Invalid or missing input
2001400Insufficient balance
2003400Cannot transfer to yourself
1001401Not authenticated
1003403Account is suspended
1004403Sender or recipient account is frozen
2005403Sender or recipient is restricted from receiving or making transactions
1012403Unverified sender above the unverified transfer limit, or unverified recipient who would exceed the unverified balance limit
2002404Recipient not found
GET /api/v2/transaction/get Authenticated

Get details of a specific transaction.

Query Parameters

ParameterTypeDescription
idstring|integer requiredTransaction database ID or transaction ID (TXN-xxx)

Response

{
    "success": true,
    "data": {
        "id": 456,
        "transaction_id": "TXN-1234567890-09af",
        "sender": {
            "id": 123,
            "username": "johnpayment"
        },
        "recipient": {
            "id": 456,
            "username": "timpurchase"
        },
        "amount": 10000,
        "note": "Thanks for the Yuri",
        "status": "confirmed",
        "created": "2026-05-01T12:33:00+00:00"
    }
}

Errors

CodeHTTPDescription
9004400Missing id or invalid identifier format
1001401Not authenticated
9005404Transaction not found
GET /api/v2/transaction/list Authenticated

Get transaction history for the authenticated user.

Response

{
    "success": true,
    "data": {
        "transactions": [
            {
                "id": 456,
                "transaction_id": "TXN-1234567890-09af",
                "sender": { "id": 123, "username": "johnpayment" },
                "recipient": { "id": 456, "username": "timpurchase" },
                "amount": 10000,
                "status": "confirmed",
                "created": "2026-05-01T12:00:00+00:00",
                "note": "Thanks for the Yuri"
            }
        ]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated

Subscriptions

GET /api/v2/user/subscriptions/list Authenticated

List the authenticated user's subscriptions.

Query Parameters

ParameterTypeDescription
statusstring optionalFilter by status: active, trialing, past_due, cancelled, expired

Response

{
    "success": true,
    "data": {
        "subscriptions": [
            {
                "subscription_id": "sub_a1b2c3d4e5f6...",
                "plan_name": "MyPayIndia Premium",
                "business_name": "MyPayIndia",
                "amount": 25000,
                "interval": "monthly",
                "interval_count": 1,
                "status": "active",
                "cancel_at_period_end": false,
                "current_period_start": "2026-06-04T10:00:00+00:00",
                "current_period_end": "2026-07-04T10:00:00+00:00",
                "cancelled_at": null,
                "created_at": "2026-06-04T10:00:00+00:00"
            }
        ]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
POST /api/v2/user/subscriptions/cancel Authenticated

Cancel a subscription at the end of the current billing period.

Request Body

ParameterTypeDescription
subscription_idstring requiredThe subscription ID (sub_xxx)

Response

{
    "success": true,
    "data": {
        "subscription_id": "sub_a1b2c3d4e5f6...",
        "cancel_at_period_end": true
    }
}

Errors

CodeHTTPDescription
9004400Missing subscription_id, or the subscription is already cancelled/scheduled for cancellation
1001401Not authenticated
1003403Account is suspended
9005404No such subscription for this user
Cancellation takes effect at the end of the current billing period. The subscription remains active until then. Use the resume endpoint to undo.
POST /api/v2/user/subscriptions/resume Authenticated

Undo a pending cancellation and resume a subscription.

Request Body

ParameterTypeDescription
subscription_idstring requiredThe subscription ID (sub_xxx)

Response

{
    "success": true,
    "data": {
        "subscription_id": "sub_a1b2c3d4e5f6...",
        "cancel_at_period_end": false
    }
}

Errors

CodeHTTPDescription
9004400Missing subscription_id, or the subscription is not pending cancellation
1001401Not authenticated
1003403Account is suspended
9005404No such subscription for this user
Only works on subscriptions with a pending cancellation (cancel_at_period_end: true). Cannot resume already cancelled or expired subscriptions.

Agent

GET /api/v2/agent/state Authenticated

Get the current conversation with MyAgentIndia

Response

{
    "success": true,
    "data": {
        "agent": {
            "name": "Nancy C \"Quechua Juandres \"Eggball\" Marley\" Sizzem",
            "short_name": "Nancy",
            "avatar": "https://mypayindia.com/images/nancy.png"
        },
        "max_length": 300,
        "greeting": "I am Nancy C \"Quechua Juandres \"Eggball\" Marley\" Sizzem. What can I help you with?",
        "transcript": [
            {
                "id": "MSG-1793980800-3fa9c21e",
                "role": "user",
                "text": "what is my balance"
            },
            {
                "id": "MSG-1793980800-b04d7e16",
                "role": "agent",
                "text": "",
                "confirmable": false,
                "steps": [],
                "results": [
                    {
                        "ok": true,
                        "message": "You have 12,345.00 INR",
                        "writes": false,
                        "kind": null,
                        "cards": []
                    }
                ]
            }
        ],
        "awaiting_confirmation": false,
        "awaiting_answer": false,
        "suggestions": [
            "what is my balance",
            "send 100 to mypayindia"
        ]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
1003403Account is suspended
awaiting_confirmation means a change is planned and waiting on /api/v2/agent/confirm. awaiting_answer means the agent asked for a missing detail and reads the next message as the answer. Every message has a unique id in the form MSG-<unix time>-<hex>, where the middle part is when the message was sent, in seconds. Every other agent endpoint returns this same object.
POST /api/v2/agent/message Authenticated

Say something to MyAgentIndia

Request Body

ParameterTypeDescription
messagestring requiredWhat the user said (max 300 chars)

Response

{
    "success": true,
    "data": {
        "greeting": "...",
        "transcript": ["..."],
        "awaiting_confirmation": true,
        "awaiting_answer": false,
        "suggestions": ["..."],
        "reply": [
            {
                "id": "MSG-1793980800-c81f02ab",
                "role": "agent",
                "text": "Confirm this action:",
                "confirmable": true,
                "steps": [
                    {
                        "status": "ready",
                        "label": "Send money",
                        "description": "Recipient: @johnpayment / Amount: 100.00",
                        "note": null
                    }
                ],
                "results": []
            }
        ]
    }
}

Errors

CodeHTTPDescription
9004400Missing or empty message
1001401Not authenticated
1003403Account is suspended
reply is what the agent said back this turn, so you can append it without having to reapply the whole transcript. Refusals come back as results[].ok: false, not an error response. text may contain *emphasis* and [label](/path) links, render or strip them. A result with a kind carries cards to draw as a list instead of a sentence: payment-links (token, amount, note, status, created, url), transactions (id, reference, other_party, sent, amount, status, created) and weather (place, flag, label, icon, temperature, feels_like, humidity).
POST /api/v2/agent/confirm Authenticated

Carry out the action MyAgentIndia is waiting on.

Response

{
    "success": true,
    "data": {
        "greeting": "...",
        "transcript": ["..."],
        "awaiting_confirmation": false,
        "awaiting_answer": false,
        "suggestions": ["..."],
        "reply": [
            {
                "id": "MSG-1793980812-07de55c4",
                "role": "agent",
                "text": "",
                "confirmable": false,
                "steps": [],
                "results": [
                    {
                        "ok": true,
                        "message": "Sent 100.00 INR to @johnpayment.",
                        "writes": true,
                        "kind": null,
                        "cards": []
                    }
                ]
            }
        ]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
1003403Account is suspended
POST /api/v2/agent/decline Authenticated

Turn down the action MyAgentIndia is waiting on.

Response

{
    "success": true,
    "data": {
        "greeting": "...",
        "transcript": ["..."],
        "awaiting_confirmation": false,
        "awaiting_answer": false,
        "suggestions": ["..."],
        "reply": [
            {
                "id": "MSG-1793980812-e2a7914d",
                "role": "agent",
                "text": "Okay, I won't do that then",
                "confirmable": false,
                "steps": [],
                "results": []
            }
        ]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
1003403Account is suspended
POST /api/v2/agent/reset Authenticated

Start a new conversation.

Response

{
    "success": true,
    "data": {
        "greeting": "...",
        "transcript": [],
        "awaiting_confirmation": false,
        "awaiting_answer": false,
        "suggestions": ["..."]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
1003403Account is suspended

App

GET /api/v2/app/version_check Public

Check the latest and minimum supported app version for a platform.

Query Parameters

ParameterTypeDescription
platformstring requiredApp platform, either "android", "ios" or "ios-legacy"

Response

{
    "success": true,
    "data": {
        "latest_version": 26050100,
        "min_supported_version": 26040200,
        "update_url": "https://mypayindia.com/app/android"
    }
}

Errors

CodeHTTPDescription
9004400Missing or invalid platform (must be android, ios or ios-legacy)
Apps force an update if their current version is below min_supported_version.

Public

GET /api/v2/info/leaderboard Public

Get users ranked by balance.

Query Parameters

ParameterTypeDescription
limitinteger optionalNumber of users to return (default 10, maximum 100)

Response

{
    "success": true,
    "data": {
        "leaderboard": [
            {
                "username": "johnpayment",
                "balance": 1234500
            }
        ]
    }
}
GET /api/v2/info/team Public

Get the list of MyPayIndia team members.

Response

{
    "success": true,
    "data": {
        "team": [
            {
                "name": "John Payment",
                "role": "Intern 5",
                "avatar": "https://mypayindia.com/siteassets/images/team/johnpayment.webp",
                "joined": "2025-12-01T08:36:00+00:00",
                "socials": {
                    "Website": "https://mypayindia.com",
                    "GitHub": "https://github.com/mypayindiadevs"
                },
                "status": "current",
                "country": "US",
                "country_name": "United States",
                "country_flag": "πŸ‡ΊπŸ‡Έ",
                "role_history": [
                    {
                        "role": "Intern 5",
                        "start_date": "2025-12-01",
                        "end_date": null
                    }
                ],
                "contributions": [
                    "January redesign",
                    "MyPWAIndia"
                ],
                "quote": "Online banking of the future",
                "pride_flags": ["rainbow", "trans"]
            }
        ]
    }
}
status is one of current, past, or special_thanks. country/country_name/country_flag, quote, and pride_flags are null or an empty array/object if not set for that member. pride_flags entries are one of: rainbow, trans, bisexual, pansexual, nonbinary, lesbian, mlm, asexual, genderfluid, aromantic, agender, intersex.

Profiles

GET /api/v2/profile/discover Public

List the public profiles and shops shown in Discover

Query Parameters

ParameterTypeDescription
qstring optionalUsername search text
verifiedboolean optionalSet to 1 to return verified profiles only
tabstring optionalSet to following when authenticated to list profiles you follow
pageinteger optionalPage number, with 24 profiles per page

Response

{
    "success": true,
    "data": {
        "profiles": [
            {
                "username": "tiago",
                "url": "https://mypayindia.com/@tiago",
                "avatar_url": "https://mypayindia.com/storage/profiles/avatars/a.webp",
                "avatar_flag": "trans",
                "avatar_accessory": "cat_ears_black",
                "pronouns": "he/him",
                "status": {"emoji": "🌱", "text": "Restocking this weekend", "expires_at": "2026-10-02T18:00:00+00:00"},
                "bio": "I sell cool stuff here.",
                "followers": 42,
                "listed_items": 3,
                "verified": true
            },
            {
                "username": "exerinity",
                "url": "https://mypayindia.com/@exerinity",
                "avatar_url": "https://mypayindia.com/storage/profiles/avatars/a.webp",
                "avatar_flag": null,
                "avatar_accessory": null,
                "pronouns": "he/him",
                "status": {"emoji": "πŸ–€", "text": "theres a science in my love for you", "expires_at": null},
                "bio": "viva la horde",
                "followers": 5,
                "listed_items": 1,
                "verified": true
            }
        ],
        "page": 1,
        "last_page": 4
    }
}
Results match the Discover page: active, public, non-system, non-profile-banned users with a bio, active shop item, or profile update. The page does not return private profiles
GET /api/v2/profile/get Public

Fetch a public profile: bio, images, balance (if shown), social links and the visible sections in display order.

Query Parameters

ParameterTypeDescription
usernamestring requiredProfile to fetch

Response

{
    "success": true,
    "data": {
        "username": "tiago",
        "url": "https://mypayindia.com/@tiago",
        "visibility": "public",
        "locked": false,
        "private": false,
        "bio": "I sell cool stuff here.",
        "pronouns": "he/him",
        "pride_flags": ["rainbow", "trans"],
        "avatar_flag": "trans",
        "avatar_accessory": "cat_ears_black",
        "country": "PT",
        "country_name": "Portugal",
        "accent": "teal",
        "status": {"emoji": "🌱", "text": "Restocking this weekend", "expires_at": "2026-10-02T18:00:00+00:00"},
        "verified": true,
        "badges": ["MyPayIndia team", "Developer"],
        "avatar_url": "https://mypayindia.com/storage/profiles/avatars/a.webp",
        "banner_url": null,
        "balance": 5050000,
        "balance_visible": true,
        "followers": 42,
        "seller_rating": {"average": 4.7, "count": 18},
        "links": [{"platform": "github", "label": "GitHub", "url": "https://github.com/tiago"}],
        "sections": [{"type": "shop", "title": "Shop", "visible": true, "config": {"title": "Shop"}}],
        "member_since": "2026-09-20T19:10:00+00:00"
    }
}

Errors

CodeHTTPDescription
9004400Missing username
1009404No such profile
A private profile returns private: true with every other field nulled or empty, unless the caller is its owner. locked is true when staff banned the user from public profiles, which makes the profile private and read-only for its owner. seller_rating averages every review left on the shop items of this user, and is {"average": 0, "count": 0} with no reviews. accent is one of brand, rose, amber, green, teal, blue, violet or slate. status is null when unset or expired, and expires_at is null for a status that never clears. Money is in paisa. Section types: shop, stats, revenue_chart, recent_sales, top_items, supporters, goal, updates, faq, text. The goal section counts only confirmed donations made with /api/v2/profile/donate or the Donate button, anonymous ones included. supporters ranks donors who chose to show their name, plus shop customers minus refunds when its config has include_shop: true (the default). Ordinary transfers never count toward either.
GET /api/v2/profile/me Authenticated

Your own profile, including hidden sections and their configuration.

Response

{ "success": true, "data": { "username": "tiago", "visibility": "public", "sections": [] } }

Errors

CodeHTTPDescription
1001401Not authenticated
POST /api/v2/profile/update Authenticated

Change your bio, visibility, balance visibility, social links or section layout. Only the fields you send are changed.

Request Body

ParameterTypeDescription
biostring optionalUp to 500 characters
pronounsstring optionalUp to 40 characters, empty to clear
pride_flagsarray optionalFlag slugs shown next to your name; replaces the current list
avatar_flagstring optionalFlag slug drawn behind your profile picture, empty for none
avatar_accessorystring optionalcat_ears_black, cat_ears_white, cat_ears_orange or cat_ears_gray, empty for none
countrystring optionalISO 3166 country code, empty for none
accentstring optionalbrand, rose, amber, green, teal, blue, violet or slate
status_emojistring optionalOne emoji, empty to clear
status_textstring optionalUp to 80 characters, empty to clear
status_expirystring optional1h, 1d, 1w or never. A changed status without it clears after 1 day
visibilitystring optionalprivate, or anything else for public
balance_visibleboolean optionalShow your balance on the profile
linksarray optionalList of {platform, url}; replaces the current list
layoutarray optionalList of {type, visible, config}; replaces the section order

Response

{ "success": true, "data": { "username": "tiago", "bio": "New bio", "visibility": "private" } }

Errors

CodeHTTPDescription
9004400Bio too long or a link is not valid for its platform
1001401Not authenticated
1003403Account is suspended
1014403Profile was locked by staff
Flag slugs: rainbow, trans, bisexual, pansexual, nonbinary, lesbian, mlm, asexual, genderfluid, aromantic, agender, intersex. Profile picture and banner uploads are only available from the web app. Platforms: website, x, bluesky, mastodon, discord, github, youtube, twitch, instagram, tiktok, reddit, telegram.
GET /api/v2/profile/updates/list Public

Latest updates (short posts) on a profile.

Query Parameters

ParameterTypeDescription
usernamestring requiredProfile to read
limitinteger optional1 to 50, default 20

Response

{
    "success": true,
    "data": {
        "updates": [
            {"id": 7, "body": "New drop tomorrow", "image_url": null, "link": "https://example.com", "score": 3, "vote": 0, "likes": 3, "liked": false, "created": "2026-09-20T19:10:00+00:00"}
        ]
    }
}

Errors

CodeHTTPDescription
1014403Profile is private
1009404No such profile
score is likes minus dislikes and can be negative. vote is your own vote: 1, -1 or 0, and null when not authenticated. likes and liked are kept for older clients and mirror score and vote === 1.
POST /api/v2/profile/updates/create Authenticated

Post an update on your profile.

Request Body

ParameterTypeDescription
bodystring requiredUp to 500 characters
linkstring optionalhttp(s) URL

Response

{ "success": true, "data": { "id": 8, "body": "Hello", "score": 0, "vote": 0, "likes": 0, "liked": false } }

Errors

CodeHTTPDescription
9004400Empty body or bad link
1001401Not authenticated
POST /api/v2/profile/updates/delete Authenticated

Delete one of your updates.

Request Body

ParameterTypeDescription
idinteger requiredUpdate id

Response

{ "success": true }

Errors

CodeHTTPDescription
1001401Not authenticated
9005404Not your update
POST /api/v2/profile/updates/vote Authenticated

Like or dislike an update. Sending the same vote again removes it.

Request Body

ParameterTypeDescription
idinteger requiredUpdate id
valueinteger required1 to like, -1 to dislike

Response

{ "success": true, "data": { "vote": -1, "score": 2 } }

Errors

CodeHTTPDescription
9004400value is not 1 or -1, or the update is yours
1001401Not authenticated
1014403Profile is private or its owner blocked you
9005404No such update
9006429More than 60 votes in a minute
You cannot vote on your own updates. Switching from a like to a dislike moves the score by 2.
POST /api/v2/profile/updates/like Authenticated

Toggle your like on an update. Same as voting 1.

Request Body

ParameterTypeDescription
idinteger requiredUpdate id

Response

{ "success": true, "data": { "liked": true, "likes": 4, "vote": 1, "score": 4 } }

Errors

CodeHTTPDescription
9004400The update is yours
1001401Not authenticated
1014403Profile is private or its owner blocked you
9005404No such update
9006429More than 60 votes in a minute
Kept for older clients. New code should use /api/v2/profile/updates/vote.
POST /api/v2/profile/report Authenticated

Report a profile to the MyPayIndia team.

Request Body

ParameterTypeDescription
usernamestring requiredProfile to report
reasonstring requiredscam, impersonation, inappropriate, spam or other
detailsstring optionalRequired when reason is other

Response

{ "success": true, "data": { "id": 3 } }

Errors

CodeHTTPDescription
9004400Bad reason, own profile, or an open report already exists
1001401Not authenticated
9006429More than 5 reports in an hour
POST /api/v2/profile/follow Authenticated

Follow a profile, or unfollow it if you already follow it. Followers get a notification when the profile posts an update.

Request Body

ParameterTypeDescription
usernamestring requiredProfile to follow or unfollow

Response

{ "success": true, "data": { "following": true, "followers": 43 } }

Errors

CodeHTTPDescription
9004400Missing username, or following yourself
1001401Not authenticated
1014403Profile is private, or its owner blocked you
1009404No such profile
9006429More than 30 follow or block toggles in a minute
POST /api/v2/profile/block Authenticated

Block a profile, or unblock it if it is already blocked.

Request Body

ParameterTypeDescription
usernamestring requiredProfile to block or unblock

Response

{ "success": true, "data": { "blocked": true } }

Errors

CodeHTTPDescription
9004400Missing username, or blocking yourself
1001401Not authenticated
1014403Profile is private
1009404No such profile
9006429More than 30 follow or block toggles in a minute
Blocking removes any follow in either direction. A blocked user cannot follow you, buy from your shop, or receive your items as a gift.
POST /api/v2/profile/donate Authenticated

Donate to a profile from your balance.

Request Body

ParameterTypeDescription
usernamestring requiredProfile to donate to
amountinteger requiredAmount in paisa, at least 100
messagestring optionalUp to 200 characters, shown to the recipient in their notifications and transaction history
publicboolean optionalShow your name in the profile's supporters. Defaults to true. Anonymous donations still count toward the donation goal

Response

{ "success": true, "data": { "transaction_id": "DON-1789932793-1f9f", "status": "confirmed", "amount": 50000, "public": true } }

Errors

CodeHTTPDescription
9004400Missing username, bad amount, or a message that is too long or has blocked words
2001400Your balance is too low
2003400Donating to yourself
1001401Not authenticated
1014403The profile is private or locked, or its owner blocked you
1003403Your account is suspended
2005403Sending or receiving is restricted, or a fund limit would be passed
1009404No such profile
9006429More than 10 donations in a minute
2004503Transfers are turned off
A donation is a transfer with a DON- transaction id, so it goes through every check a normal transfer does and shows up in both parties' transaction history. Large or unusual donations return status: "pending" and only count on the profile once staff confirm them. The recipient always sees who sent a donation.

Shop

GET /api/v2/shop/items Public

Items listed in a user's shop.

Query Parameters

ParameterTypeDescription
usernamestring requiredShop owner

Response

{
    "success": true,
    "data": {
        "items": [
            {
                "id": 2,
                "seller": "tiago",
                "name": "Hand-drawn cat portrait",
                "description": "I draw your cat.",
                "image_url": "https://mypayindia.com/storage/shop/items/x.webp",
                "price": 120000,
                "stock": 5,
                "sold_out": false,
                "delivery": "manual",
                "options": [
                    {"key": "cat_name", "label": "Your cat's name", "type": "text", "required": true},
                    {"key": "frame", "label": "Frame", "type": "select", "required": false, "choices": [{"label": "None", "price": 0}, {"label": "Wooden", "price": 30000}]}
                ],
                "sold": 2,
                "created": "2026-09-20T19:10:00+00:00"
            }
        ]
    }
}

Errors

CodeHTTPDescription
1014403Profile is private
1009404No such profile
stock is null for unlimited stock. Option types: checkbox (adds price when ticked), select (each choice carries its own price), text (free input). Prices are in paisa and add to the unit price.
GET /api/v2/shop/item Public

One item. Owners also get its status and instant-delivery content.

Query Parameters

ParameterTypeDescription
idinteger requiredItem id

Response

{ "success": true, "data": { "id": 2, "name": "Hand-drawn cat portrait", "price": 120000 } }

Errors

CodeHTTPDescription
1014403Shop is private
9005404No such item, or it is hidden or archived
GET /api/v2/shop/my/items Authenticated

Your own items, including hidden ones.

Response

{ "success": true, "data": { "items": [ { "id": 2, "status": "active", "instant_type": null, "instant_content": null } ] } }

Errors

CodeHTTPDescription
1001401Not authenticated
POST /api/v2/shop/items/create Authenticated

Add an item to your shop.

Request Body

ParameterTypeDescription
namestring requiredUp to 100 characters
priceinteger requiredUnit price in paisa
pwywboolean optionalLet buyers pay what they want, with price as the minimum
descriptionstring optionalUp to 2000 characters
stockinteger|null optionalUnits available; null or omitted for unlimited
deliverystring requiredinstant or manual
instant_typestring optionaltext or url (instant delivery only)
instant_contentstring optionalWhat the buyer receives (instant delivery only)
hiddenboolean optionalKeep it off your profile
optionsarray optionalBuyer fields: [{label, type, required, price?, choices?: [{label, price}]}]

Response

{ "success": true, "data": { "id": 3, "name": "Sticker pack", "price": 5000, "status": "active" } }

Errors

CodeHTTPDescription
9004400Validation failed, or the shop is at its item limit
1001401Not authenticated
1003403Account is suspended
Item images and image-type instant deliveries are only available from the web app.
POST /api/v2/shop/items/update Authenticated

Change an item. Takes the same fields as create plus id; fields you leave out keep their value.

Request Body

ParameterTypeDescription
idinteger requiredItem id

Response

{ "success": true, "data": { "id": 3, "name": "Sticker pack v2" } }

Errors

CodeHTTPDescription
9004400Validation failed
1001401Not authenticated
9005404Not your item
POST /api/v2/shop/items/restock Authenticated

Set stock, and optionally hide or show the item.

Request Body

ParameterTypeDescription
idinteger requiredItem id
stockinteger|null optionalNew stock; null or omitted for unlimited
hiddenboolean optionalHide from or show on your profile

Response

{ "success": true, "data": { "id": 3, "stock": 40, "status": "active" } }

Errors

CodeHTTPDescription
9004400Negative stock
1001401Not authenticated
9005404Not your item
POST /api/v2/shop/items/archive Authenticated

Take an item off sale for good. Past orders keep referring to it.

Request Body

ParameterTypeDescription
idinteger requiredItem id

Response

{ "success": true }

Errors

CodeHTTPDescription
1001401Not authenticated
9005404Not your item
POST /api/v2/shop/buy Authenticated

Buy an item. The total is transferred to the seller at once; instant items are delivered in the response.

Request Body

ParameterTypeDescription
item_idinteger requiredItem id
quantityinteger optionalDefault 1
optionsobject optionalAnswers keyed by field key: true for a checkbox, the choice index for a select, a string for text
discount_codestring optionalDiscount code created by the seller, case-insensitive
gift_tostring optionalUsername to send the item to as a gift
amountinteger optionalPay what you want items only: the unit amount in paisa, at least the price plus option extras. Defaults to that minimum. Quantity must be 1. Discounts apply to this amount

Response

{
    "success": true,
    "data": {
        "id": 12,
        "order_id": "ORD-1789932793-5B7CF1",
        "item_id": 2,
        "item_name": "Hand-drawn cat portrait",
        "buyer": "alice",
        "seller": "tiago",
        "recipient": null,
        "side": "buyer",
        "quantity": 2,
        "unit_price": 150000,
        "subtotal": 300000,
        "discount_code": "SUMMER10",
        "discount_amount": 30000,
        "total": 270000,
        "selections": [{"key": "frame", "label": "Frame", "value": "Wooden", "price": 30000}],
        "delivery": "manual",
        "status": "pending",
        "delivery_type": null,
        "delivery_content": null,
        "attachment_url": null,
        "transaction_id": "SHP-1789932793-1f9f",
        "refund_transaction_id": null,
        "created": "2026-09-20T19:33:00+00:00",
        "fulfilled_at": null
    }
}

Errors

CodeHTTPDescription
9004400Missing required field, bad quantity, out of stock, invalid discount code, or a gift recipient that cannot receive it
2001400Insufficient balance
2003400Buying from your own shop
1001401Not authenticated
1004403Your account or the seller's is frozen
1014403The seller blocked you, or the shop is private
9005404Item is not for sale
2002404No user matches gift_to
9006429More than 10 purchases in a minute
Every transfer rule applies (restrictions, unverified limits). A purchase whose transfer is flagged for review comes back with status: in_review: the buyer has paid, the seller is credited and the order delivered only once staff approve it, and the buyer can cancel it for a full refund until then with /api/v2/shop/purchases/cancel. A fulfilled instant order carries delivery_type and delivery_content; image deliveries expose attachment_url instead, which needs the same session. subtotal is the price before the discount and total is what was charged. With gift_to, the order goes to recipient: the delivery is only shown to the recipient, so the buyer always sees delivery_type, delivery_content and attachment_url as null.
GET /api/v2/shop/orders Authenticated

Orders placed in your shop, newest first, 25 per page.

Query Parameters

ParameterTypeDescription
statusstring optionalin_review, pending, fulfilled or refunded
pageinteger optionalPage number

Response

{ "success": true, "data": { "orders": [], "page": 1, "last_page": 1 } }

Errors

CodeHTTPDescription
1001401Not authenticated
GET /api/v2/shop/purchases Authenticated

Items you bought or were gifted, newest first, 25 per page. Delivered content stays available here for good.

Query Parameters

ParameterTypeDescription
statusstring optionalin_review, pending, fulfilled or refunded
pageinteger optionalPage number

Response

{ "success": true, "data": { "orders": [], "page": 1, "last_page": 1 } }

Errors

CodeHTTPDescription
1001401Not authenticated
GET /api/v2/shop/order Authenticated

One order you bought, sold or received as a gift.

Query Parameters

ParameterTypeDescription
idinteger requiredOrder id (numeric, not the ORD- reference)

Response

{ "success": true, "data": { "id": 12, "status": "fulfilled", "delivery_type": "text", "delivery_content": "CODE-1234" } }

Errors

CodeHTTPDescription
1001401Not authenticated
9005404Not your order
side is seller, buyer or recipient. On a gift, only the seller and the recipient see the delivery.
GET /api/v2/shop/order/messages Authenticated

Messages on an order, oldest first. The buyer, the seller and a gift recipient can read them.

Query Parameters

ParameterTypeDescription
idinteger requiredOrder id (numeric, not the ORD- reference)

Response

{
    "success": true,
    "data": {
        "messages": [{"id": 4, "author": "alice", "body": "Can you make it blue?", "created": "2026-09-20T19:40:00+00:00"}]
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
9005404Not your order
POST /api/v2/shop/order/messages/send Authenticated

Send a message on an order. Every other party gets a notification.

Request Body

ParameterTypeDescription
idinteger requiredOrder id
bodystring requiredUp to 1000 characters

Response

{ "success": true, "data": { "id": 5, "author": "tiago", "body": "Sure, done!", "created": "2026-09-20T19:42:00+00:00" } }

Errors

CodeHTTPDescription
9004400Empty or too long message
1001401Not authenticated
9005404Not your order
9006429More than 20 messages in 10 minutes
GET /api/v2/shop/item/reviews Public

Star rating summary and the latest reviews of an item.

Query Parameters

ParameterTypeDescription
idinteger requiredItem id
limitinteger optional1 to 50, default 20

Response

{
    "success": true,
    "data": {
        "summary": {"average": 4.5, "count": 2},
        "reviews": [{"id": 3, "order_id": 12, "item_id": 2, "buyer": "alice", "rating": 5, "body": "Lovely work!", "created": "2026-09-21T10:00:00+00:00", "updated": "2026-09-21T10:00:00+00:00"}]
    }
}

Errors

CodeHTTPDescription
1014403Shop is private
9005404No such item
POST /api/v2/shop/purchases/review Authenticated

Rate a delivered order you bought. Sending it again edits your review.

Request Body

ParameterTypeDescription
idinteger requiredOrder id
ratinginteger required1 to 5 stars
bodystring optionalUp to 500 characters

Response

{ "success": true, "data": { "id": 3, "order_id": 12, "item_id": 2, "buyer": "alice", "rating": 5, "body": "Lovely work!", "created": "2026-09-21T10:00:00+00:00", "updated": "2026-09-21T10:00:00+00:00" } }

Errors

CodeHTTPDescription
9004400Missing or out of range rating, order not delivered yet, or a body that is too long or inappropriate
1001401Not authenticated
9005404You did not buy this order
9006429More than 10 reviews in a minute
Only the buyer can review. A gift recipient cannot. The seller is notified the first time an order is reviewed.
POST /api/v2/shop/orders/fulfill Authenticated

Deliver a pending order from your shop. The buyer is notified and emailed.

Request Body

ParameterTypeDescription
idinteger requiredOrder id
typestring requiredtext or url
contentstring requiredWhat the buyer receives, up to 5000 characters

Response

{ "success": true, "data": { "id": 12, "status": "fulfilled", "delivery_type": "url", "delivery_content": "https://example.com/art" } }

Errors

CodeHTTPDescription
9004400Already handled, empty content, or bad URL
1001401Not authenticated
9005404Not an order in your shop
Image deliveries are only available from the web app.
POST /api/v2/shop/orders/refund Authenticated

Refund a pending order. The money goes back to the buyer and the stock to the item.

Request Body

ParameterTypeDescription
idinteger requiredOrder id

Response

{ "success": true, "data": { "id": 12, "status": "refunded", "refund_transaction_id": "RFD-1789932800-ab12" } }

Errors

CodeHTTPDescription
9004400Order is not pending
2001400You no longer hold the amount
1001401Not authenticated
9005404Not an order in your shop
POST /api/v2/shop/purchases/cancel Authenticated

Cancel one of your orders while its payment is still in review. The money comes straight back.

Request Body

ParameterTypeDescription
idinteger requiredOrder id

Response

{ "success": true, "data": { "id": 12, "status": "refunded" } }

Errors

CodeHTTPDescription
9004400Order is not in review
1001401Not authenticated
9005404Not your order
GET /api/v2/shop/notifications Authenticated

Shop notifications (sales, orders, deliveries, refunds), newest first, 25 per page.

Query Parameters

ParameterTypeDescription
pageinteger optionalPage number

Response

{
    "success": true,
    "data": {
        "unread": 1,
        "notifications": [
            {"id": 5, "kind": "order", "message": "@alice ordered Hand-drawn cat portrait (Γ—2). It is waiting for you to fulfill it.", "order_id": 12, "read": false, "created": "2026-09-20T19:33:00+00:00"}
        ],
        "page": 1,
        "last_page": 1
    }
}

Errors

CodeHTTPDescription
1001401Not authenticated
Kinds: sold, order, pending, delivered, refunded. Listing does not mark anything read; call /api/v2/shop/notifications/read for that.
POST /api/v2/shop/notifications/read Authenticated

Mark every shop notification as read.

Response

{ "success": true }

Errors

CodeHTTPDescription
1001401Not authenticated
GET /api/v2/shop/saved Authenticated

List the items you saved, newest first. You get a restock notification when a saved item comes back in stock.

Response

{ "success": true, "data": { "items": [{ "id": 3, "seller": "tiago", "name": "Sticker pack", "price": 5000, "pwyw": false, "stock": 0, "sold_out": true }] } }

Errors

CodeHTTPDescription
1001401Not authenticated
POST /api/v2/shop/saved/toggle Authenticated

Save an item, or remove it if it is already saved. Limited to 30 calls a minute.

Request Body

ParameterTypeDescription
idinteger requiredItem id

Response

{ "success": true, "data": { "saved": true } }

Errors

CodeHTTPDescription
1001401Not authenticated
1014403The seller blocked you
9005404Item not found or not for sale
9006429Too many requests