Skip to main content

API Reference

Methods#

createPayment#

static async createPayment(options: PaymentOptions): Promise<Payment>

This function lets you start a MercadoPago Checkout Flow Activity or UI Controller depending on the platform that is running.

Parameters#

NameTypeDescription
optionsPaymentOptionsAn object which contains the payment configuration.

Return value#

NameTypeDescription
paymentPaymentAn object which contains the payment information.

Type Definitions#

PaymentOptions#

  • options: PaymentOptions
    • publicKey: string - Key generated from your account to launch a checkout
    • preferenceId: string - ID of the payment preference
    • language: SupportedLanguages - Sets the language for the checkout, IOS only
    • advancedOptions: AdvancedOptions
      • amountRowEnabled: boolean - Boolean flag to determine if amount row should be enabled
      • bankDealsEnabled: boolean - Boolean flag to determine if bank deals should be enabled
      • productId: string - Custom product ID
    • trackingOptions: TrackingOptions
      • sessionId: string - Session ID for checkout tracking, Android only

Payment#

  • payment: Payment
    • id: string - ID of the payment
    • status: PaymentStatus - Status of the payment
    • statusDetail: string - Status of the payment with more details
    • operationType: string | null - The Type of operation
    • description: string | null - The description of the payment
    • currencyId: string | null - The ID of the currency
    • paymentMethodId: string | null - The ID of the payment method
    • paymentTypeId: string | null - The ID of the payment type
    • issuerId: string | null - The ID of the card issuer
    • installments: number | null - The amount of installments
    • captured: boolean | null - If the payment is captured
    • liveMode: boolean | null - If the payment is in live mode
    • transactionAmount: number | null - The amount of the transaction