Pay For Presale With Stripe
Process presale payments using Stripe payment gateway with full 3D Secure support
Stripe Payment for Presale
Process secure credit card payments with PCI-compliant Stripe integration
Mutation
Schema
payStripeForPreSale(
id: Int
presaleId: Int!
orderId: Int!
amount: Float!
fiatAmount: Float!
fiatType: String!
paymentIntentId: String!
paymentMethodId: String!
isSaveCard: Boolean
): PayResponse
Parameters
id
OptionalInt
null
for the first callpresaleId
RequiredInt!
orderId
RequiredInt!
amount
RequiredFloat!
fiatAmount
RequiredFloat!
fiatType
RequiredString!
paymentIntentId
RequiredString!
The payment intent ID from Stripe. See Stripe API docs
paymentMethodId
RequiredString!
The payment method ID from Stripe. See Stripe API docs
isSaveCard
OptionalBoolean
true
to save card for future payments, false
for new cardReturn Value
Contains client secret and payment status for completing the Stripe payment flow
Example
mutation {
payStripeForPreSale(
id: null
presaleId: 1
orderId: 123
amount: 500.0
fiatAmount: 500.0
fiatType: "USD"
paymentIntentId: "pi_1Fxxxxx"
paymentMethodId: "pm_1Fxxxxx"
isSaveCard: false
) {
clientSecret
paymentIntentId
requiresAction
error
}
}
Response Example
{
"data": {
"payStripeForPreSale": {
"clientSecret": "pi_1Fxxxxx_secret_xxxxx",
"paymentIntentId": "pi_1Fxxxxx",
"requiresAction": false,
"error": null
}
}
}
Integration Flow
Load Stripe.js in your frontend and create a payment intent
Use Stripe Elements to securely collect card information from the user
Obtain paymentIntentId and paymentMethodId from Stripe API
Submit payment with Stripe IDs to process the presale payment
If requiresAction is true, use clientSecret with Stripe's confirmCardPayment for 3D Secure
Use Cases
Accept one-time payments from new credit or debit cards with full PCI compliance
Allow users to save their card details for faster future presale payments
Built-in support for 3D Secure authentication when required by the card issuer
Support for multiple fiat currencies with automatic conversion to USD
Always check the requiresAction flag in the response. When true, you must use Stripe's confirmCardPayment method with the clientSecret to complete 3D Secure authentication. This ensures compliance with Strong Customer Authentication (SCA) requirements.