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
Process credit and debit card payments with full PCI compliance
Accept payments through PayPal checkout
Accept multiple cryptocurrencies via deposit addresses
Pay using internal wallet balances
Real-time cryptocurrency pricing
Manage supported cryptocurrencies
Data Models
Coin
type Coin {
name: String
symbol: String
}nameThe full name of the cryptocurrencysymbolThe trading symbol (e.g., BTC, ETH, USDT)PayResponse
type PayResponse {
clientSecret: String
paymentIntentId: String
requiresAction: Boolean
error: String
}clientSecretClient secret for payment confirmationpaymentIntentIdUnique payment intent identifierrequiresActionIndicates if 3D Secure authentication is needederrorError message if payment failedStripeTransaction
type StripeTransaction {
roundId: String!
userId: String!
paymentIntentId: String
amount: Float
status: Int
createdAt: Float
}roundIdPresale round IDuserIdUser identifierpaymentIntentIdStripe payment IDamountPayment amountstatusTransaction statuscreatedAtCreation timestampCryptoTransaction
type CryptoTransaction {
txnId: String!
roundId: String!
userId: String!
code: String!
amount: Float!
cryptoAmount: Float
cryptoType: String
status: Int
createdAt: String
updatedAt: String
}txnIdTransaction IDroundIdPresale round IDuserIdUser identifiercodeTransaction codeamountUSD amountcryptoAmountCrypto amountcryptoTypeCryptocurrency typestatusPayment statusCryptoPayload
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 cryptocurrencypricingPricing information for each cryptocurrencyPayment Flow
Use placePreSaleOrder mutation to create an order with desired NDB amount and destination
Choose from Stripe, PayPal, cryptocurrency, or NYYU wallet based on user preference
Call the appropriate payment mutation with order details and payment information
For PayPal, capture the order. For Stripe, handle 3D Secure if required. For crypto, wait for confirmations
Once payment is confirmed, NDB tokens are allocated to the specified destination (internal wallet or external address)
Integration Guides
Initialize Stripe.js on your frontend and create payment intents. Use our mutations to process payments with full 3D Secure support.
Create PayPal checkout orders and redirect users to PayPal. Capture orders upon successful payment completion.
Generate deposit addresses for various cryptocurrencies. Monitor blockchain confirmations and update order status automatically.
Enable instant payments using users' internal NYYU wallet balances. No external gateways required for faster processing.
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.