API दायरा

डेवलपर API संदर्भ

स्थिर मुद्रा चेकआउट, आदेश निर्माण और डिलीवरी ट्रैकिंग के लिए उत्पादन-केंद्रित cURL और Node उदाहरण।

इस गाइड में शामिल

  • उपहार कार्ड
  • मोबाइल टॉप-अप
  • eSIM खरीद

यहाँ शामिल नहीं है

  • उड़ानें
  • ठहराव

एंडपॉइंट्स में गोताखोरी से पहले व्यापक एकीकरण संदर्भ की आवश्यकता है?

एकीकरण अवलोकन खोलें

Compliance notice

  • Stablecoins on Tron (USDT/USDC) require the customer's full name on file before an order can complete. The API returns FULLNAME_MISSING when this applies.
  • Emoney products require a whitelabel account. To enable Emoney product support in your integration, contact us to set up a whitelabel account.
  • Spending limits apply to all accounts. Once a user reaches their daily or monthly limit the API returns DAILY_SPENDING_LIMIT_EXCEEDED or MONTHLY_SPENDING_LIMIT_EXCEEDED. Verified users receive higher limits. See Terms of Service for exact thresholds.
  • Handling KYC errors depends on your integration. How you direct users through identity verification depends on your platform setup.

All identity and spending-limit features require a Cryptorefills whitelabel account. Contact us to get set up or to discuss your integration.

1

प्रमाणीकरण

प्रत्येक API अनुरोध के लिए इन हेडरों की आवश्यकता होती है। Cryptorefills खाता बनाने के बाद, आप अपने खाता जानकारी पृष्ठ पर अपना भागीदार ID पा सकते हैं।
bash
# Required headers for every API request
-H 'X-Cr-Application: YOUR_PARTNER_ID'
-H 'X-Cr-Version: YOUR_APP_VERSION'
-H 'X-Forwarded-For: END_USER_IP'
-H 'User-Agent: END_USER_AGENT'
-H 'Content-Type: application/json'
2

भुगतान विधियाँ

GET/v3/payment_vias
सभी समर्थित सिक्कों और ब्लॉकचेन नेटवर्क को लाएं। USDC, USDT को Solana, Ethereum, Base, Arbitrum, Polygon, और अधिक पर लौटाता है।
bash
curl -X GET 'https://api.cryptorefills.com/v3/payment_vias' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT'

सिफारिश की: Solana पर USDC सबसे कम शुल्क और सबसे तेज़ निपटान प्रदान करता है।

3

ब्रांड कैटलॉग

GET/v2/brands?country_code={countryCode}
(वैकल्पिक) किसी देश के लिए सभी उपलब्ध ब्रांडों की सूची बनाएं। ब्रांड निर्देशिका या खोज सुविधाओं के निर्माण के लिए महान।
bash
curl -X GET 'https://api.cryptorefills.com/v2/brands?country_code=US' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT'

लोगो यूआरएल विविधताएँ

प्रत्येक ब्रांड एक logo_url (डिफ़ॉल्ट) और एक logo_base_url लौटाता है। अनुकूलित आकारों और प्रारूपों को प्राप्त करने के लिए logo_base_url में एक उपसर्ग जोड़ें।

.webpसिफारिश की गई

  • {logo_base_url}.webp
  • {logo_base_url}_500x318.webp
  • {logo_base_url}_300x190.webp

.jpg

  • {logo_base_url}.jpg
  • {logo_base_url}_500x318.jpg
  • {logo_base_url}_300x190.jpg

उदाहरण: https://cdn.cryptorefills.com/logos_v2/esim_500x318.webp

समर्थित देश कोड

233
  • AXÅland Islands
  • ALAlbania
  • DZAlgeria
  • ASAmerican Samoa
  • ADAndorra
  • AOAngola
  • AIAnguilla
  • AQAntarctica
  • AGAntigua and Barbuda
  • ARArgentina
  • AMArmenia
  • AWAruba
  • AUAustralia
  • ATAustria
  • AZAzerbaijan
  • BSBahamas
  • BHBahrain
  • BDBangladesh
  • BBBarbados
  • BEBelgium
  • BZBelize
  • BJBenin
  • BMBermuda
  • BTBhutan
  • BOBolivia
  • BQBonaire, Sint Eustatius and Saba
  • BABosnia and Herzegovina
  • BWBotswana
  • BVBouvet Island
  • BRBrazil
  • IOBritish Indian Ocean Territory
  • BNBrunei Darussalam
  • BGBulgaria
  • BFBurkina Faso
  • BIBurundi
  • CVCabo Verde
  • KHCambodia
  • CMCameroon
  • CACanada
  • KYCayman Islands
  • TDChad
  • CLChile
  • CNChina
  • CXChristmas Island
  • CCCocos (Keeling) Islands
  • COColombia
  • KMComoros
  • CGCongo
  • CKCook Islands
  • CRCosta Rica
  • CICôte d'Ivoire
  • HRCroatia
  • CWCuraçao
  • CYCyprus
  • CZCzechia
  • DKDenmark
  • DJDjibouti
  • DMDominica
  • DODominican Republic
  • ECEcuador
  • EGEgypt
  • SVEl Salvador
  • GQEquatorial Guinea
  • EREritrea
  • EEEstonia
  • SZEswatini
  • ETEthiopia
  • FKFalkland Islands
  • FOFaroe Islands
  • FJFiji
  • FIFinland
  • FRFrance
  • GFFrench Guiana
  • PFFrench Polynesia
  • TFFrench Southern Territories
  • GAGabon
  • GMGambia
  • GEGeorgia
  • DEGermany
  • GHGhana
  • GIGibraltar
  • GRGreece
  • GLGreenland
  • GDGrenada
  • GPGuadeloupe
  • GUGuam
  • GTGuatemala
  • GGGuernsey
  • GNGuinea
  • GWGuinea-Bissau
  • GYGuyana
  • HTHaiti
  • HMHeard Island and McDonald Islands
  • HNHonduras
  • HKHong Kong
  • HUHungary
  • ISIceland
  • INIndia
  • IDIndonesia
  • IEIreland
  • IMIsle of Man
  • ILIsrael
  • ITItaly
  • JMJamaica
  • JPJapan
  • JEJersey
  • JOJordan
  • KZKazakhstan
  • KEKenya
  • KIKiribati
  • XKKosovo
  • KWKuwait
  • KGKyrgyzstan
  • LALaos
  • LVLatvia
  • LBLebanon
  • LSLesotho
  • LRLiberia
  • LILiechtenstein
  • LTLithuania
  • LULuxembourg
  • MOMacao
  • MGMadagascar
  • MWMalawi
  • MYMalaysia
  • MVMaldives
  • MTMalta
  • MHMarshall Islands
  • MQMartinique
  • MRMauritania
  • MUMauritius
  • YTMayotte
  • MXMexico
  • FMMicronesia
  • MDMoldova
  • MCMonaco
  • MNMongolia
  • MEMontenegro
  • MSMontserrat
  • MAMorocco
  • MZMozambique
  • NANamibia
  • NRNauru
  • NPNepal
  • NLNetherlands
  • NCNew Caledonia
  • NZNew Zealand
  • NINicaragua
  • NENiger
  • NGNigeria
  • NUNiue
  • NFNorfolk Island
  • MKNorth Macedonia
  • MPNorthern Mariana Islands
  • NONorway
  • OMOman
  • PKPakistan
  • PWPalau
  • PSPalestine
  • PAPanama
  • PGPapua New Guinea
  • PYParaguay
  • PEPeru
  • PHPhilippines
  • PNPitcairn
  • PLPoland
  • PTPortugal
  • PRPuerto Rico
  • QAQatar
  • RERéunion
  • RORomania
  • RWRwanda
  • BLSaint Barthélemy
  • SHSaint Helena
  • KNSaint Kitts and Nevis
  • LCSaint Lucia
  • MFSaint Martin (French part)
  • PMSaint Pierre and Miquelon
  • VCSaint Vincent and the Grenadines
  • WSSamoa
  • SMSan Marino
  • STSao Tome and Principe
  • SASaudi Arabia
  • SNSenegal
  • RSSerbia
  • SCSeychelles
  • SLSierra Leone
  • SGSingapore
  • SXSint Maarten
  • SKSlovakia
  • SISlovenia
  • SBSolomon Islands
  • SOSomalia
  • ZASouth Africa
  • GSSouth Georgia and the South Sandwich Islands
  • KRSouth Korea
  • ESSpain
  • LKSri Lanka
  • SRSuriname
  • SJSvalbard and Jan Mayen
  • SESweden
  • CHSwitzerland
  • TWTaiwan
  • TJTajikistan
  • TZTanzania
  • THThailand
  • TLTimor-Leste
  • TGTogo
  • TKTokelau
  • TOTonga
  • TTTrinidad and Tobago
  • TNTunisia
  • TRTürkiye
  • TMTurkmenistan
  • TCTurks and Caicos Islands
  • TVTuvalu
  • UGUganda
  • UAUkraine
  • AEUnited Arab Emirates
  • GBUnited Kingdom
  • USUnited States
  • UMUnited States Minor Outlying Islands
  • UYUruguay
  • UZUzbekistan
  • VUVanuatu
  • VAVatican City
  • VNVietnam
  • VGVirgin Islands (British)
  • VIVirgin Islands (U.S.)
  • WFWallis and Futuna
  • EHWestern Sahara
  • YEYemen
  • ZMZambia
4

होमपेज फीड

GET/v2/homepage?country_code={countryCode}
(वैकल्पिक) किसी देश के लिए एक क्यूरेटेड होमपेज फीड लाएं। ट्रेंडिंग या विशेष उपहार कार्ड प्रदर्शित करने के लिए उपयोगी।
bash
curl -X GET 'https://api.cryptorefills.com/v2/homepage?country_code=US' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT'
5

उत्पाद ब्राउज़ करें

GET/v5/products/country/{countryCode}
किसी ब्रांड और देश के लिए सभी उपलब्ध उपहार कार्डों की सूची बनाएं। निश्चित मूल्य और कस्टम राशि (रेंज) का समर्थन करता है।
bash
curl -X GET 'https://api.cryptorefills.com/v5/products/country/US?family_name=airbnb&coin=USDC&lang=en' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT'
6

क्रिप्टो मूल्य प्राप्त करें

GET/v4/products/price
किसी भी उपहार कार्ड मूल्य को स्थिर मुद्रा राशि में परिवर्तित करें। उपयोगकर्ताओं को खरीदारी की पुष्टि करने से पहले सटीक क्रिप्टो राशि दिखाने के लिए इसका उपयोग करें।
bash
curl -X GET 'https://api.cryptorefills.com/v4/products/price?brand_name=Airbnb&country_code=US&face_value=100&coin=USDC' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT'
7

आदेश मान्य करें

POST/v5/orders/validations
(अनुशंसित) आदेश बनाने से पहले समस्याओं की जांच करें। ईमेल/लाभार्थी खाता में असली अंतिम उपयोगकर्ता ईमेल का उपयोग करें, क्योंकि Cryptorefills उस प्राप्तकर्ता को डिलीवर करता है।
bash
curl -X POST 'https://api.cryptorefills.com/v5/orders/validations' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT' \
  -d '{
    "email": "END_USER_EMAIL",
    "payment": {
      "type": "via",
      "payment_via": "USER_WALLET",
      "coin": "USDC"
    },
    "deliveries": [
      {
        "beneficiary_account": "END_USER_EMAIL",
        "brand_name": "Airbnb",
        "country_code": "US",
        "denomination": "100 USD"
      }
    ],
    "lang": "en"
  }'

संभावित त्रुटियाँ

प्रतिक्रिया एक समस्याओं की सूची लौटाती है। प्रत्येक प्रविष्टि का आकार { समस्या, अधिक विवरण? } होता है, और एक साथ कई समस्याएँ लौटाई जा सकती हैं। शीर्ष-स्तरीय HTTP त्रुटियाँ (निलंबन) { स्थिति, विवरण, अधिक विवरण? } के रूप में लौटती हैं।

Order amount & limits

  • AMOUNT_LESS_THEN_MINIMUM_ALLOWEDOrder total is below the minimum coin amount allowed.
  • MAXIMUM_AMOUNT_PER_ORDER_EXCEEDEDOrder total exceeds the per-order maximum.
  • DAILY_SPENDING_LIMIT_EXCEEDEDUser has hit the daily spending limit for their tier.
  • MONTHLY_SPENDING_LIMIT_EXCEEDEDUser has hit the monthly spending limit for their tier.
  • PRODUCT_COUNT_EXCEEDEDCart contains more products than the per-order maximum.
  • MULTIPLE_LIMITED_PRODUCT_SAME_ORDEROrder contains more than one rate-limited product.

Product availability

  • NOT_AVAILABLE_PRODUCTProduct is no longer in the catalogue.
  • OUT_OF_STOCKProduct is currently out of stock.
  • NOT_ACTIVEProduct is inactive or paused.
  • INVALID_BENEFICIARY_ACCOUNTBeneficiary account is invalid — e.g. phone number for a mobile topup or email for a gift card.

Payment method & network

  • NOT_ALLOWED_PAYMENT_VIASelected payment_via is not allowed for this order. moreDetails lists allowed kinds.
  • UNSUPPORTED_PROTOCOL_COIN_COMBINATIONChosen protocol + coin pair is not supported. moreDetails lists supported combinations.

Authentication

  • LOGIN_REQUIREDOne or more products require a signed-in user.
  • COUPON_REQUIRES_LOGINThe coupon can only be redeemed by a signed-in user.

Coupon codes

  • COUPON_NOT_FOUNDCoupon code does not exist.
  • COUPON_NOT_ACTIVECoupon is not yet active.
  • COUPON_ALREADY_SPENTCoupon has already been redeemed by this user.
  • COUPON_MAX_USAGE_REACHEDCoupon has reached its overall usage cap.
  • COUPON_EXPIREDCoupon is past its validity date.
  • COUPON_BELOW_MIN_AMOUNTOrder total is below the coupon’s minimum amount.
  • COUPON_NOT_VALID_FOR_USERCoupon is not valid for this user.
  • COUPON_NOT_VALID_FOR_CATEGORYCoupon does not apply to the selected product categories.
  • COUPON_NOT_VALID_FOR_KINDCoupon does not apply to the selected product kind.
  • COUPON_NOT_VALID_FOR_BRANDCoupon does not apply to the selected brands.
  • COUPON_NOT_VALID_FOR_COUNTRYCoupon is not valid in the order country.
  • COUPON_NOT_VALID_FOR_STORECoupon is not valid for the requested store or region.

Compliance & identity verification

  • KYC_MISSINGOne or more products require a verified account, or the user has exceeded the spending limit for unverified accounts. Direct the user to their Cryptorefills account to complete identity verification before retrying.
  • KYC_PENDINGIdentity verification is already in progress for this account. This typically completes within 20 minutes but may take up to 48 hours.
  • VERIFICATION_REQUIREDCryptorefills requires additional verification for this account before the order can proceed. Contact Cryptorefills support if this persists.

HTTP-level errors (top-level detail field)

  • SUSPENDED_COINThe selected coin is temporarily suspended.
  • SUSPENDED_NETWORKThe selected network is temporarily suspended.
8

आदेश बनाएं

POST/v5/orders
एक आदेश बनाएं और भुगतान के लिए एक वॉलेट पता प्राप्त करें। असली अंतिम उपयोगकर्ता ईमेल का उपयोग करें क्योंकि Cryptorefills को उस प्राप्तकर्ता को उत्पाद डिलीवर करना है। भुगतान विंडो 30 मिनट है।
bash
curl -X POST 'https://api.cryptorefills.com/v5/orders' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT' \
  -d '{
    "deliveries": [
      {
        "brand_name": "Airbnb",
        "country_code": "US",
        "denomination": "100 USD",
        "beneficiary_account": "END_USER_EMAIL"
      }
    ],
    "payment": {
      "type": "via",
      "coin": "USDC",
      "network": "Solana",
      "payment_via": "USER_WALLET"
    },
    "user": {
      "email": "END_USER_EMAIL",
      "has_accepted_newsletter": true
    },
    "lang": "en",
    "acquisition": {
      "utm_source": "your_platform"
    }
  }'

Range product example

For products with a flexible amount (e.g. open-value gift cards), set denomination to "range" and pass the desired value in product_value.

bash
curl -X POST 'https://api.cryptorefills.com/v5/orders' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT' \
  -d '{
    "payment": {
      "payment_via": "USER_WALLET",
      "coin": "USDC",
      "type": "via",
      "network": "POLYGON (MATIC)"
    },
    "deliveries": [
      {
        "beneficiary_account": "END_USER_EMAIL",
        "brand_name": "Everything Apple",
        "country_code": "US",
        "denomination": "range",
        "product_value": 12
      }
    ],
    "lang": "en"
  }'

लाभार्थी खाता

प्रत्येक डिलीवरी में एक शामिल होना चाहिए beneficiary_account इसकी डिलीवरी में, Cryptorefills उत्पाद वितरित करता है। आवश्यक प्रारूप उत्पाद के प्रकार पर निर्भर करता है।

  • गिफ्ट कार्ड और eSIMs: अंत-उपयोगकर्ता का ईमेल पता उपयोग करें — उदाहरण के लिए user@example.com.
  • मोबाइल टॉप-अप: प्राप्तकर्ता के फोन नंबर का E.164 प्रारूप में उपयोग करें, जिसमें अग्रणी + और देश कोड शामिल है — उदाहरण के लिए +14155551234.

प्रतिक्रिया में शामिल हैं wallet_address and coin_amount. इन्हें अपने उपयोगकर्ता के साथ साझा करें।

9a

आदेश ट्रैक करें (स्ट्रीम API)

GET/api/orders/{orderId}/subscribe
इसे दो आवश्यक भागों में लागू करें: एक सर्वर-साइड SSE प्रॉक्सी रूट और एक क्लाइंट-साइड स्ट्रीम हुक।
  • API रूट प्राप्त करता है/api/orders/{orderId}/subscribe और अपस्ट्रीम को अग्रेषित करता है/v5/orders/{orderId}/subscribe.
  • क्लाइंट हुक खोलता हैEventSource स्थानीय API रूट के लिए, पेलोड को मान्य करता है, और आवश्यकता पड़ने पर बैकऑफ के साथ फिर से कनेक्ट करता है।

सर्वर-साइड आवश्यक कोड

javascript
// app/api/orders/[orderId]/subscribe/route.ts
let upstream: Response;

try {
  upstream = await fetch(
    `https://api.cryptorefills.com/v5/orders/${params?.orderId}/subscribe`,
    {
      method: 'GET',
      headers: {
        ...(await genHeader.server(session)),
        'User-Agent': user_agent,
        Accept: 'text/event-stream',
        Connection: 'keep-alive',
      },
    },
  );
} catch (err) {
  return NextResponse.json(
    { error: 'Failed to connect to upstream stream' },
    { status: 502 },
  );
}

if (!upstream.ok || !upstream.body) {
  return NextResponse.json(
    { error: 'Upstream returned an error' },
    { status: upstream.status || 502 },
  );
}

// stream = ReadableStream that proxies upstream SSE events
return new Response(stream, {
  status: 200,
  headers: {
    'Content-Type': 'text/event-stream',
    'Cache-Control': 'no-cache, no-transform',
    Connection: 'keep-alive',
    'X-Accel-Buffering': 'no',
  },
});

क्लाइंट-साइड आवश्यक कोड

javascript

const { data: lastEvent, error } = useSWRSubscription<TOrderSchema>(
  referenceOrderId ? `orders-info-stream-${referenceOrderId}` : null,
  ((key, { next }) => {
    let es: EventSource | null = null;
    let stopped = false;
    let shouldReconnect = true;
    let retryTimeout: number | null = null;
    let retryDelay = 1000;

    const cleanup = () => {
      if (es) {
        es.close();
        es = null;
      }
      if (retryTimeout !== null) {
        window.clearTimeout(retryTimeout);
        retryTimeout = null;
      }
    };

    const stopForever = () => {
      shouldReconnect = false;
      stopped = true;
      cleanup();
    };

    const connect = () => {
      if (stopped) return;
      cleanup();
      es = new EventSource(`/api/orders/${referenceOrderId}/subscribe`);

      es.addEventListener('message', (ev) => {
        try {
          const raw = JSON.parse(ev.data);
          const parsed = orderSchema.safeParse(raw);
          if (!parsed.success) return;
          retryDelay = 1000;
          next(null, parsed.data as TOrderSchema);
        } catch (err) {
          next(err as Error);
        }
      });

      es.addEventListener('stop', () => {
        stopForever();
      });

      es.onerror = () => {
        if (stopped || !shouldReconnect) return;
        cleanup();
        retryTimeout = window.setTimeout(() => {
          retryDelay = Math.min(retryDelay * 2, 30000);
          connect();
        }, retryDelay);
      };
    };

    connect();

    return () => {
      stopped = true;
      cleanup();
    };
  }) as SubscriptionCallback<TOrderSchema>,
);

इस रिपॉजिटरी में रूट

app/api/orders/[orderId]/subscribe/route.ts

सर्वर साइड (API रूट)

सत्र-आधारित सर्वर हेडर का उपयोग करता हैgenHeader.server(session), फिर अपस्ट्रीम को कॉल करता है${process.env.API_URL}/v5/orders/${params?.orderId}/subscribe. कनेक्शन विफलता पर यह लौटाता है502.

क्लाइंट साइड (हुक)

खोलता हैEventSource के लिए/api/orders/${referenceOrderId}/subscribe, प्रत्येक पेलोड को मान्य करता हैorderSchema.safeParse, संभालता हैstop इवेंट्स, और गुणात्मक बैकऑफ के साथ फिर से कनेक्ट करता है।

9b

आदेश ट्रैक करें (पोलिंग)

GET/v5/orders/{orderId}
फॉलबैक दृष्टिकोण: भुगतान प्राप्त होने तक हर 5-10 सेकंड में पोल करें। उपहार कार्ड कोड तब दिखाई देता है जब स्थिति 'पूर्ण' होती है।
bash
curl -X GET 'https://api.cryptorefills.com/v5/orders/ord_abc123xyz' \
  -H 'Content-Type: application/json' \
  -H 'X-Cr-Application: YOUR_PARTNER_ID' \
  -H 'X-Cr-Version: YOUR_APP_VERSION' \
  -H 'X-Forwarded-For: END_USER_IP' \
  -H 'User-Agent: END_USER_AGENT'

पोलिंग का उपयोग करें जब

आप SSE कनेक्शन को खुला नहीं रख सकते, या आपका क्लाइंट वातावरण EventSource को विश्वसनीय रूप से समर्थन नहीं करता।

सामान्य आदेश राज्य

WaitingForPayment -> WaitingForDelivery -> Done

Created
Order has been created but no payment activity yet. Initial state right after checkout.
WaitingForPayment
Order is awaiting the customer's crypto payment. The payment window is open and countdown is running.
PaymentStarted
Customer has initiated a payment (transaction broadcast) but it hasn't been confirmed/received yet.
PartialPaymentStarted
A partial payment has been detected — the customer paid less than the required amount.
PaymentReceived
Payment has been received and confirmed on-chain, but delivery hasn't started yet.
WaitingForDelivery
Payment is confirmed; the order is queued for delivery.
WaitingForManualAction
Order requires manual intervention by the team (e.g. verification, supplier issue, edge case).
Done
Order is fully completed and delivered to the customer. Terminal success state.
Expired
Payment window elapsed without a valid payment being received. Terminal state.
PaymentFailed
The payment attempt failed (e.g. on-chain failure, rejected transaction).
PaymentSetupFailed
The payment couldn't even be set up (e.g. provider/quote failure before the user could pay).
Refunded
Order was refunded to the customer.