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 invoiceId
must need to pass anyone.
Name | Type | Description | Required |
---|---|---|---|
quantity | Int | The number of units purchased. | No |
marketplaceBuyNowLotID | UUID | The marketplace buy now lot id to get the listed price | No |
invoiceId | UUID | They create payment against the invoice id | No |
discountCode | String | The discount code, if provided the payment amount will reduce | No |
billingDetails | Object | Contains all information from TaxQuoteBillingAddressInput | Yes |
Fields
Name | Type | Description |
---|---|---|
PaymentIntent | Object | PaymentIntent contains the all information |