NYYU Logo
APIPresale Payment

Presale Payment API Overview

Comprehensive payment processing system for presale orders with multiple payment methods

Presale Payment API

Complete payment processing solution with multiple payment gateways and cryptocurrency support

Overview

The Presale Payment API provides a comprehensive payment processing system for presale orders. It supports multiple payment methods including credit cards (Stripe), PayPal, cryptocurrency, and internal wallet balances. This flexible system enables seamless integration with various payment gateways while maintaining security and reliability.

Payment Methods

💳
Stripe Payments

Process credit and debit card payments with full PCI compliance

New card payments
Saved card support
3D Secure ready
🅿️
PayPal

Accept payments through PayPal checkout

Checkout redirect
Order capture
Multi-currency
Cryptocurrency

Accept multiple cryptocurrencies via deposit addresses

Bitcoin, Ethereum, USDT
Network selection
Real-time pricing
👛
NYYU Wallet

Pay using internal wallet balances

Instant payments
No fees
Multi-crypto support
💰
Price Discovery

Real-time cryptocurrency pricing

Live market rates
Multi-coin support
Price API endpoint
🛠️
Admin Tools

Manage supported cryptocurrencies

Add new coins
Remove coins
Coin listings

Data Models

Coin

🪙
Coin Type
Represents a cryptocurrency coin
type Coin {
  name: String
  symbol: String
}
nameThe full name of the cryptocurrency
symbolThe trading symbol (e.g., BTC, ETH, USDT)

PayResponse

📦
PayResponse Type
Payment processing response from Stripe
type PayResponse {
  clientSecret: String
  paymentIntentId: String
  requiresAction: Boolean
  error: String
}
clientSecretClient secret for payment confirmation
paymentIntentIdUnique payment intent identifier
requiresActionIndicates if 3D Secure authentication is needed
errorError message if payment failed

StripeTransaction

💳
StripeTransaction Type
Stripe payment transaction record
type StripeTransaction {
  roundId: String!
  userId: String!
  paymentIntentId: String
  amount: Float
  status: Int
  createdAt: Float
}
roundIdPresale round ID
userIdUser identifier
paymentIntentIdStripe payment ID
amountPayment amount
statusTransaction status
createdAtCreation timestamp

CryptoTransaction

CryptoTransaction Type
Cryptocurrency payment transaction
type CryptoTransaction {
  txnId: String!
  roundId: String!
  userId: String!
  code: String!
  amount: Float!
  cryptoAmount: Float
  cryptoType: String
  status: Int
  createdAt: String
  updatedAt: String
}
txnIdTransaction ID
roundIdPresale round ID
userIdUser identifier
codeTransaction code
amountUSD amount
cryptoAmountCrypto amount
cryptoTypeCryptocurrency type
statusPayment status

CryptoPayload

📮
CryptoPayload Type
Cryptocurrency payment details
type CryptoPayload {
  addresses: [AddressList]
  pricing: [PricingList]
}

type AddressList {
  key: String!
  value: String!
}

type PricingList {
  key: String!
  value: CoinbasePricing!
}

type CoinbasePricing {
  amount: String!
  currency: String!
}
addressesList of deposit addresses by cryptocurrency
pricingPricing information for each cryptocurrency

Payment Flow

🔄
Complete Payment Workflow
End-to-end presale payment process
1
Create Presale Order

Use placePreSaleOrder mutation to create an order with desired NDB amount and destination

2
Select Payment Method

Choose from Stripe, PayPal, cryptocurrency, or NYYU wallet based on user preference

3
Process Payment

Call the appropriate payment mutation with order details and payment information

4
Confirm Payment

For PayPal, capture the order. For Stripe, handle 3D Secure if required. For crypto, wait for confirmations

5
Order Fulfillment

Once payment is confirmed, NDB tokens are allocated to the specified destination (internal wallet or external address)

Integration Guides

💳
Stripe Integration

Initialize Stripe.js on your frontend and create payment intents. Use our mutations to process payments with full 3D Secure support.

🅿️
PayPal Integration

Create PayPal checkout orders and redirect users to PayPal. Capture orders upon successful payment completion.

Crypto Integration

Generate deposit addresses for various cryptocurrencies. Monitor blockchain confirmations and update order status automatically.

👛
Wallet Integration

Enable instant payments using users' internal NYYU wallet balances. No external gateways required for faster processing.

💡
Best Practices

Always validate payment amounts on the backend. Implement proper error handling for failed transactions. For cryptocurrency payments, wait for sufficient blockchain confirmations before fulfilling orders. Store transaction IDs for reconciliation and customer support purposes.