Payment Intent
A PaymentIntent tracks the full lifecycle of collecting one payment from your customer: from creation, through authorization and 3-D Secure, to capture and final outcome. We recommend creating one PaymentIntent per order: you can inspect its history of Charge attempts, watch its `status` as it transitions, and reference the successful Charge it ultimately produces. PaymentIntents are the object that the hosted Checkout and xpay.js drive on the client to complete a payment.
A PaymentIntent tracks the full lifecycle of collecting one payment from your customer: from creation, through authorization and 3-D Secure, to capture and final outcome. We recommend creating one PaymentIntent per order: you can inspect its history of Charge attempts, watch its status as it transitions, and reference the successful Charge it ultimately produces. PaymentIntents are the object that the hosted Checkout and xpay.js drive on the client to complete a payment.
{ "id": "string", "object": "payment_intent", "checkoutSessionId": "string", "amount": 0, "amountCapturable": 0, "amountReceived": 0, "currency": "EGP", "status": "REQUIRES_PAYMENT_METHOD", "createdAt": "string", "updatedAt": "string", "clientSecret": "string", "captureMethod": "string", "confirmationMethod": "string", "description": "string", "receiptEmail": "string", "canceledAt": "string", "shipping": { "address": { "city": "string", "country": "string", "line1": "string", "line2": "string", "postalCode": "string", "state": "string" }, "name": "string", "phone": "string" }, "amountDetails": { "productAmount": 0, "tax": { "amount": 0, "rateBps": 0 }, "platformFees": { "amount": 0, "vatAmount": 0 }, "tip": 0, "discount": 0 }, "presentmentDetails": { "amount": 0, "currency": "EGP", "exchangeRate": 0, "exchangeRateId": "string" }, "latestCharge": { "id": "string", "object": "charge", "amount": 0, "amountCaptured": 0, "amountRefunded": 0, "currency": "EGP", "createdAt": "2019-08-24T14:15:22Z", "status": "SUCCEEDED", "paid": true, "refunded": true, "captured": true, "capturedAt": "2019-08-24T14:15:22Z", "failureCode": "string", "failureMessage": "string", "receiptNumber": "string", "receiptUrl": "string", "receiptEmail": "string", "billingDetails": { "address": {}, "email": "string", "name": "string", "phone": "string" }, "paymentMethodDetails": { "type": "string", "card": {}, "valu": {}, "fawry": {} }, "outcome": { "networkStatus": "string", "reason": "string", "riskLevel": "string", "riskScore": 0, "sellerMessage": "string", "type": "string" }, "balanceTransaction": { "id": "string", "object": "balance_transaction", "amount": 0, "availableOn": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "currency": "EGP", "description": "string", "fee": 0, "net": 0, "feeDetails": [ null ], "status": "AVAILABLE", "type": "CHARGE", "reportingCategory": "string", "exchangeRate": 0, "source": "string", "payoutBatch": {}, "paymentIntentId": "string", "merchantId": "string" }, "presentmentDetails": { "amount": 0, "currency": "EGP", "exchangeRate": 0, "exchangeRateId": "string" }, "refunds": [ {} ], "paymentIntentId": "string", "paymentMethodId": "string", "calculatedStatementDescriptor": "string", "disputed": true, "externalChargeId": "string", "config": { "vatCollectionEnabled": true, "vatCollectionRate": 0, "collectedVatAmount": 0, "platformFeePassThrough": true, "merchantFeeDeduction": 0 }, "geocoding": { "ipAddress": "string", "location": {} }, "session": { "browser": "string", "browserVersion": "string", "platform": "string", "device": "string", "deviceVendor": "string", "deviceModel": "string" }, "merchantOrigin": "string", "merchantDomain": "string", "referrerDomain": "string", "referrerObservedAt": "2019-08-24T14:15:22Z", "processorCapabilities": { "supportsRefund": true, "supportsPartialRefund": true }, "activeHoldId": "string", "settlementModel": "aggregated" }, "charges": [ { "id": "string", "object": "charge", "amount": 0, "amountCaptured": 0, "amountRefunded": 0, "currency": "EGP", "createdAt": "2019-08-24T14:15:22Z", "status": "SUCCEEDED", "paid": true, "refunded": true, "captured": true, "capturedAt": "2019-08-24T14:15:22Z", "failureCode": "string", "failureMessage": "string", "receiptNumber": "string", "receiptUrl": "string", "receiptEmail": "string", "billingDetails": {}, "paymentMethodDetails": {}, "outcome": {}, "balanceTransaction": { "feeDetails": [] }, "presentmentDetails": {}, "refunds": [ null ], "paymentIntentId": "string", "paymentMethodId": "string", "calculatedStatementDescriptor": "string", "disputed": true, "externalChargeId": "string", "config": {}, "geocoding": {}, "session": {}, "merchantOrigin": "string", "merchantDomain": "string", "referrerDomain": "string", "referrerObservedAt": "2019-08-24T14:15:22Z", "processorCapabilities": {}, "activeHoldId": "string", "settlementModel": "aggregated" } ], "paymentMethod": { "id": "string", "object": "payment_method", "card": { "brand": "string", "country": "string", "displayBrand": "string", "expMonth": 0, "expYear": 0, "fingerprint": "string", "funding": "string", "last4": "string", "networks": { "available": [] }, "regulatedStatus": "string", "threeDSecureUsage": {}, "wallet": {} }, "valu": { "loanNumber": "string", "tenure": 0, "emi": "string", "downPayment": "string", "financedAmount": "string", "firstEmiDueDate": "string", "lastInstallmentDate": "string" }, "fawry": { "fawryRefNumber": "string", "paymentReferenceNumber": "string", "paymentMethod": "string", "paymentTime": 0, "expiresAt": "2019-08-24T14:15:22Z" }, "billingDetails": { "address": {}, "email": "string", "name": "string", "phone": "string" }, "type": "card", "createdAt": "2019-08-24T14:15:22Z" }, "customer": { "id": "string", "name": "string", "email": "string", "phone": "string" }, "nextAction": { "type": "redirect_to_url", "redirectToUrl": { "url": "string", "returnUrl": "string" }, "displayVoucherDetails": { "provider": "string", "reference": "string", "expiresAt": "2019-08-24T14:15:22Z", "instructions": "string", "hostedVoucherUrl": "string" } }, "metadata": { "property1": null, "property2": null }, "lastPaymentError": { "code": "string", "declineCode": "string", "networkDeclineCode": "string", "docUrl": "string", "message": "string", "merchantMessage": "string", "adviceCode": "confirm_card_data", "param": "string", "chargeId": "string", "paymentMethod": { "id": "string", "type": "string", "card": {}, "billingDetails": {} }, "paymentMethodType": "string", "type": "api_error", "processorCode": "string", "processorMessage": "string" }, "checkoutSession": { "id": "string", "object": "checkout.session", "createdAt": "string", "updatedAt": "string", "mode": "payment", "uiMode": "hosted", "submitType": "PAY", "customerCreation": "always", "status": "open", "paymentStatus": "paid", "currency": "EGP", "amountSubtotal": 0, "amountTotal": 0, "totalDetails": { "amountDiscount": 0, "amountShipping": 0, "amountTax": 0, "amountPlatformFee": 0, "amountCollectedVat": 0 }, "presentmentDetails": { "amount": 0, "currency": "EGP", "exchangeRate": 0, "exchangeRateId": "string", "amountSubtotal": 0, "amountTotal": 0, "amountDiscount": 0, "amountCollectedVat": 0, "amountPlatformFee": 0, "amountTax": 0 }, "afterCompletion": { "type": "redirect", "redirect": {}, "hostedConfirmation": {} }, "cancelUrl": "string", "url": "string", "clientSecret": "string", "expiresAt": "string", "isExpired": true, "customerId": "string", "externalCustomerId": "string", "customer": { "id": "string", "type": "guest", "name": "string", "email": "string", "phone": "string", "address": {}, "shipping": {}, "metadata": {} }, "customerDetails": { "name": "string", "email": "string", "phone": "string", "billingDetails": {}, "shipping": {} }, "paymentIntentId": "string", "lineItems": [ {} ], "customFields": [ { "dropdownOptions": [] } ], "discounts": [ {} ], "allowPromotionCodes": true, "nameCollection": true, "billingAddressCollection": true, "shippingAddressCollection": true, "phoneNumberCollection": true, "feeConfig": { "feesPassThrough": true, "vatCollectionEnabled": true, "vatCollectionRate": 0, "source": "session" }, "brandingSettings": { "colorMode": "light", "borderStyle": "rounded", "spacing": "condensed", "inputSize": "small", "inputStyle": "flat", "formLayout": "compact", "colors": {}, "fontFamily": "string" }, "locale": "auto", "paymentMethodTypes": [ { "requiredCustomerFields": [] } ], "paymentMethodConfigurationId": "string", "fees": { "paymentMethodType": "string", "feeAmount": 0, "feePercentage": 0, "vatAmount": 0, "totalAmount": 0, "cardInfo": {} }, "customerUpdate": { "address": "auto", "name": "auto", "shipping": "auto" }, "metadata": { "property1": null, "property2": null }, "merchantId": "string", "merchantName": "string", "merchantLogo": "string", "paymentLinkId": "string", "invoiceId": "string", "livemode": true }}Invoice
An Invoice is a statement of what a customer owes, with a page where they can pay it. An invoice starts as a draft you can edit freely. Finalizing it assigns its number, freezes its amounts and the customer's details, and makes it payable. A finalized invoice is never edited: correct it with a credit note, or revise it, which replaces it with a new invoice. An invoice can take several payments, online or recorded by you, and is paid when nothing remains.
Payment Link
A Payment Link is a shareable URL you can send to a customer to collect a single payment or set up a subscription, without writing any checkout code. Open the URL in any browser and we render the hosted checkout, collect payment details, and process the payment. Use Payment Links for one-off invoices, social-media checkout, in-person QR codes, or anywhere you need a checkout page without integrating the SDK.