createStripePaymentIntent

This mutation allows to create a stripe payment intent , in this create the payment link with actual NFT listing price with tax and if discount code applied, the amount will differ .final user payable amount will generate the payment intent id provide response front end to pay user with credit card.

Sample Mutation

mutation createStripePaymentIntent($quantity: Int, $marketplaceBuyNowLotID: UUID1, $invoiceId: UUID1, $discountCode: String, $billingDetails: TaxQuoteBillingAddressInput!) {
  createStripePaymentIntent(
    quantity: $quantity
    marketplaceBuyNowLotID: $marketplaceBuyNowLotID
    invoiceId: $invoiceId
    discountCode: $discountCode
    billingDetails: $billingDetails
  ) {
    totalPrice
    totalPriceAfterDiscount
    discountedAmount
    totalTaxedPrice
    stripeClientSecret
    paymentIntentId
    __typename
  }
}

Sample variable

{
  "invoiceId": "7aef85d6-7109-42b1-b274-5efbc865076d",
  "billingDetails": {
    "street1": "2/2149",
    "city": "Chennai",
    "state": "TN",
    "postalCode": "600001",
    "country": "IN"
  }
}

Sample response

{
  "data": {
    "createStripePaymentIntent": {
      "totalPrice": 1,
      "totalPriceAfterDiscount": 1,
      "discountedAmount": 0,
      "totalTaxedPrice": 1,
      "stripeClientSecret": "pi_3Pkmp9DGPVU9vnqw0nTAAGMM_secret_HlWAxhl9KDtaSWIDFU4MTuAwV",
      "paymentIntentId": "pi_3Pkmp9DGPVU9vnqw0nTAAGMM",
      "__typename": "PaymentIntent"
    }
  }
}

Arguments

Note: marketplaceBuyNowLotID with quantity or invoiceIdmust need to pass anyone.

NameTypeDescriptionRequired
quantityIntThe number of units purchased.No
marketplaceBuyNowLotIDUUIDThe marketplace buy now lot id to get the listed priceNo
invoiceIdUUIDThey create payment against the invoice idNo
discountCodeStringThe discount code, if provided the payment amount will reduceNo
billingDetailsObjectContains all information from TaxQuoteBillingAddressInputYes

Fields

NameTypeDescription
PaymentIntentObjectPaymentIntent contains the all information