• Home
  • SDK Documentation
Search Results for

    Show / Hide Table of Contents
    • MercadoPago.Client
      • AdvancedSearchRequest
      • IdempotentRequest
      • MercadoPagoClient<TResource>
      • RequestOptions
      • SearchRequest
    • MercadoPago.Client.AdvancedPayment
      • AdvancedPaymentAdditionalInfoPayerRequest
      • AdvancedPaymentAdditionalInfoRequest
      • AdvancedPaymentCancelRequest
      • AdvancedPaymentCaptureRequest
      • AdvancedPaymentClient
      • AdvancedPaymentCreateRequest
      • AdvancedPaymentDisbursementRequest
      • AdvancedPaymentItemRequest
      • AdvancedPaymentPayerRequest
      • AdvancedPaymentReceiverAddressRequest
      • AdvancedPaymentRefundClient
      • AdvancedPaymentRefundCreateRequest
      • AdvancedPaymentShipmentsRequest
      • AdvancedPaymentSplitPaymentRequest
      • AdvancedPaymentTaxRequest
      • AdvancedPaymentTransactionDetailsRequest
      • AdvancedPaymentUpdateReleaseDateRequest
    • MercadoPago.Client.AuthorizedPayment
      • AuthorizedPaymentClient
    • MercadoPago.Client.CardToken
      • CardTokenClient
      • CardTokenRequest
    • MercadoPago.Client.Common
      • AddressRequest
      • DifferentialPricingRequest
      • IdentificationRequest
      • PhoneRequest
      • SubMerchant
    • MercadoPago.Client.Customer
      • CustomerCardClient
      • CustomerCardCreateRequest
      • CustomerClient
      • CustomerDefaultAddressRequest
      • CustomerRequest
    • MercadoPago.Client.IdentificationType
      • IdentificationTypeClient
    • MercadoPago.Client.MerchantOrder
      • MerchantOrderClient
      • MerchantOrderCreateRequest
      • MerchantOrderItemRequest
      • MerchantOrderPayerRequest
      • MerchantOrderReceiverAddressCityRequest
      • MerchantOrderReceiverAddressCountryRequest
      • MerchantOrderReceiverAddressRequest
      • MerchantOrderReceiverAddressStateRequest
      • MerchantOrderShipmentRequest
      • MerchantOrderShippingEstimatedDeliveryRequest
      • MerchantOrderShippingOptionRequest
      • MerchantOrderShippingSpeedRequest
      • MerchantOrderUpdateRequest
    • MercadoPago.Client.OAuth
      • CreateOAuthCredentialRequest
      • OAuthClient
      • RefreshOAuthCredentialRequest
    • MercadoPago.Client.Order
      • OrderAddressRequest
      • OrderAutomaticPaymentRequest
      • OrderClient
      • OrderConfigRequest
      • OrderCreateRequest
      • OrderIdentificationRequest
      • OrderInvoicePeriodRequest
      • OrderItemsRequest
      • OrderOnlineConfigRequest
      • OrderPayerRequest
      • OrderPaymentMethodConfigRequest
      • OrderPaymentMethodRequest
      • OrderPaymentRequest
      • OrderPhoneRequest
      • OrderRefundClient
      • OrderRefundPaymentRequest
      • OrderRefundTransactionRequest
      • OrderStoredCredentialRequest
      • OrderSubscriptionDataRequest
      • OrderSubscriptionSequenceRequest
      • OrderTransactionClient
      • OrderTransactionRequest
      • OrderTransactionUpdateClient
    • MercadoPago.Client.Payment
      • PaymentAdditionalInfoPayerRequest
      • PaymentAdditionalInfoRequest
      • PaymentAuthenticationRequest
      • PaymentCancelRequest
      • PaymentCaptureRequest
      • PaymentCategoryDescriptorRequest
      • PaymentClient
      • PaymentCreateRequest
      • PaymentDataRequest
      • PaymentDiscountRequest
      • PaymentFeeRequest
      • PaymentForwardDataRequest
      • PaymentInvoicePeriodRequest
      • PaymentItemRequest
      • PaymentMerchantServicesRequest
      • PaymentMethodRequest
      • PaymentOrderRequest
      • PaymentPassengerRequest
      • PaymentPayerAddressRequest
      • PaymentPayerPhoneRequest
      • PaymentPayerRequest
      • PaymentPaymentReferenceRequest
      • PaymentPointOfInteractionRequest
      • PaymentReceiverAddressRequest
      • PaymentRefundClient
      • PaymentRefundCreateRequest
      • PaymentRouteRequest
      • PaymentRulesRequest
      • PaymentShipmentsRequest
      • PaymentSubscriptionSequenceRequest
      • PaymentTaxRequest
      • PaymentTransactionDataRequest
      • PaymentTransactionDetailsRequest
    • MercadoPago.Client.PaymentMethod
      • PaymentMethodClient
    • MercadoPago.Client.Preapproval
      • PreApprovalAutoRecurringCreateRequest
      • PreApprovalAutoRecurringUpdateRequest
      • PreapprovalClient
      • PreapprovalCreateRequest
      • PreapprovalUpdateRequest
    • MercadoPago.Client.Preference
      • PreferenceBackUrlsRequest
      • PreferenceCategoryDescriptorRequest
      • PreferenceClient
      • PreferenceFreeMethodRequest
      • PreferenceItemRequest
      • PreferencePassengerRequest
      • PreferencePayerRequest
      • PreferencePaymentMethodRequest
      • PreferencePaymentMethodsRequest
      • PreferencePaymentTypeRequest
      • PreferenceReceiverAddressRequest
      • PreferenceRequest
      • PreferenceRouteRequest
      • PreferenceShipmentsRequest
      • PreferenceTaxRequest
      • PreferenceTrackRequest
      • PreferenceTrackValuesRequest
    • MercadoPago.Client.User
      • UserClient
    • MercadoPago.Config
      • MercadoPagoConfig
    • MercadoPago.Error
      • ApiError
      • ApiErrorCause
      • MercadoPagoApiException
      • MercadoPagoException
    • MercadoPago.Http
      • DefaultHttpClient
      • DefaultRetryStrategy
      • Headers
      • HttpMethod
      • IHttpClient
      • IRetryStrategy
      • MercadoPagoRequest
      • MercadoPagoResponse
      • RetryResponse
    • MercadoPago.Resource
      • ElementsResourcesPage<TResource>
      • IResource
      • IResourcesPage<TResouce>
      • ResourcesList<TResource>
      • ResultsPaging
      • ResultsResourcesPage<TResource>
    • MercadoPago.Resource.AdvancedPayment
      • AdvancedPayment
      • AdvancedPaymentAdditionalInfo
      • AdvancedPaymentAdditionalInfoPayer
      • AdvancedPaymentDisbursement
      • AdvancedPaymentDisbursementRefund
      • AdvancedPaymentItem
      • AdvancedPaymentPayer
      • AdvancedPaymentReceiverAddress
      • AdvancedPaymentShipments
      • AdvancedPaymentSplitPayment
      • AdvancedPaymentStatus
      • AdvancedPaymentTax
      • AdvancedPaymentTransactionDetails
    • MercadoPago.Resource.AuthorizedPayment
      • AuthorizedPayment
      • AuthorizedPaymentStatus
    • MercadoPago.Resource.CardToken
      • CardToken
    • MercadoPago.Resource.Common
      • Address
      • Identification
      • Phone
      • Source
    • MercadoPago.Resource.Customer
      • Customer
      • CustomerAddress
      • CustomerAddressCity
      • CustomerAddressCountry
      • CustomerAddressMunicipality
      • CustomerAddressNeighborhood
      • CustomerAddressState
      • CustomerCard
      • CustomerCardCardholder
      • CustomerCardCardholderIdentification
      • CustomerCardIssuer
      • CustomerCardPaymentMethod
      • CustomerCardSecurityCode
      • CustomerDefaultAddress
    • MercadoPago.Resource.IdentificationType
      • IdentificationType
    • MercadoPago.Resource.MerchantOrder
      • MerchantOrder
      • MerchantOrderCollector
      • MerchantOrderItem
      • MerchantOrderPayer
      • MerchantOrderPayment
      • MerchantOrderReceiverAddress
      • MerchantOrderReceiverAddressCity
      • MerchantOrderReceiverAddressCountry
      • MerchantOrderReceiverAddressState
      • MerchantOrderShipment
      • MerchantOrderShippingEstimatedDelivery
      • MerchantOrderShippingOption
      • MerchantOrderShippingSpeed
    • MercadoPago.Resource.OAuth
      • OAuthCredential
    • MercadoPago.Resource.Order
      • Order
      • OrderAttempt
      • OrderIntegrationData
      • OrderItems
      • OrderPayer
      • OrderPayment
      • OrderPaymentMethod
      • OrderRefundItem
      • OrderSponsor
      • OrderTransaction
      • OrderUpdateTransaction
    • MercadoPago.Resource.Payment
      • Payment
      • PaymentAdditionalInfo
      • PaymentAdditionalInfoPayer
      • PaymentApplicationData
      • PaymentBankInfo
      • PaymentBankInfoCollector
      • PaymentBankInfoPayer
      • PaymentBarcode
      • PaymentCard
      • PaymentCardholder
      • PaymentData
      • PaymentDiscount
      • PaymentFee
      • PaymentFeeDetail
      • PaymentInvoicePeriod
      • PaymentItem
      • PaymentMethod
      • PaymentOrder
      • PaymentPayer
      • PaymentPaymentReference
      • PaymentPointOfInteraction
      • PaymentReceiverAddress
      • PaymentRefund
      • PaymentRules
      • PaymentShipments
      • PaymentStatus
      • PaymentSubscriptionSequence
      • PaymentTax
      • PaymentThreeDSInfo
      • PaymentTransactionData
      • PaymentTransactionDetails
    • MercadoPago.Resource.PaymentMethod
      • PaymentMethod
      • PaymentMethodFinancialInstitutions
      • PaymentMethodSettings
      • PaymentMethodSettingsBin
      • PaymentMethodSettingsCardNumber
      • PaymentMethodSettingsSecurityCode
    • MercadoPago.Resource.PreApproval
      • Preapproval
      • PreapprovalAutoRecurring
    • MercadoPago.Resource.Preference
      • Preference
      • PreferenceBackUrls
      • PreferenceCategoryDescriptor
      • PreferenceDifferentialPricing
      • PreferenceFreeMethod
      • PreferenceItem
      • PreferencePassenger
      • PreferencePayer
      • PreferencePaymentMethod
      • PreferencePaymentMethods
      • PreferencePaymentType
      • PreferenceReceiverAddress
      • PreferenceRoute
      • PreferenceShipments
      • PreferenceTax
      • PreferenceTrack
      • PreferenceTrackValues
    • MercadoPago.Resource.User
      • User
    • MercadoPago.Serialization
      • DefaultSerializer
      • ISerializer

    Class OAuthClient

    Client with methods to create a OAuth Credential.

    Inheritance
    object
    MercadoPagoClient<OAuthCredential>
    OAuthClient
    Inherited Members
    MercadoPagoClient<OAuthCredential>.HttpClient
    MercadoPagoClient<OAuthCredential>.Serializer
    MercadoPagoClient<OAuthCredential>.DefaultHeaders
    MercadoPagoClient<OAuthCredential>.SendAsync(string, HttpMethod, object, RequestOptions, CancellationToken)
    MercadoPagoClient<OAuthCredential>.Send(string, HttpMethod, object, RequestOptions)
    MercadoPagoClient<OAuthCredential>.ListAsync(string, HttpMethod, object, RequestOptions, CancellationToken)
    MercadoPagoClient<OAuthCredential>.List(string, HttpMethod, object, RequestOptions)
    MercadoPagoClient<OAuthCredential>.SearchAsync<TPageResult>(string, SearchRequest, RequestOptions, CancellationToken)
    MercadoPagoClient<OAuthCredential>.Search<TPageResult>(string, SearchRequest, RequestOptions)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: MercadoPago.Client.OAuth
    Assembly: MercadoPago.dll
    Syntax
    public class OAuthClient : MercadoPagoClient<OAuthCredential>

    Constructors

    | Edit this page View Source

    OAuthClient()

    Initializes a new instance of the OAuthClient class.

    Declaration
    public OAuthClient()
    | Edit this page View Source

    OAuthClient(IHttpClient)

    Initializes a new instance of the OAuthClient class.

    Declaration
    public OAuthClient(IHttpClient httpClient)
    Parameters
    Type Name Description
    IHttpClient httpClient

    The http client that will be used in HTTP requests.

    | Edit this page View Source

    OAuthClient(IHttpClient, ISerializer)

    Initializes a new instance of the OAuthClient class.

    Declaration
    public OAuthClient(IHttpClient httpClient, ISerializer serializer)
    Parameters
    Type Name Description
    IHttpClient httpClient

    The http client that will be used in HTTP requests.

    ISerializer serializer

    The serializer that will be used to serialize the HTTP requests content and to deserialize the HTTP response content.

    | Edit this page View Source

    OAuthClient(ISerializer)

    Initializes a new instance of the OAuthClient class.

    Declaration
    public OAuthClient(ISerializer serializer)
    Parameters
    Type Name Description
    ISerializer serializer

    The serializer that will be used to serialize the HTTP requests content and to deserialize the HTTP response content.

    Methods

    | Edit this page View Source

    CreateOAuthCredential(string, string, RequestOptions)

    Creates an OAuth credentials using access token as client secret.

    Declaration
    public OAuthCredential CreateOAuthCredential(string authorizationCode, string redirectUri, RequestOptions requestOptions = null)
    Parameters
    Type Name Description
    string authorizationCode

    Authorization code.

    string redirectUri

    Redirect Uri.

    RequestOptions requestOptions

    RequestOptions.

    Returns
    Type Description
    OAuthCredential

    The OAuth credential.

    Exceptions
    Type Condition
    MercadoPagoException

    If a unexpected exception occurs.

    MercadoPagoApiException

    If the API returns a error.

    | Edit this page View Source

    CreateOAuthCredential(string, string, string, string, RequestOptions)

    Creates an OAuth credentials with client id and client secret.

    Declaration
    public OAuthCredential CreateOAuthCredential(string authorizationCode, string clientId, string clientSecret, string redirectUri, RequestOptions requestOptions = null)
    Parameters
    Type Name Description
    string authorizationCode

    Authorization code.

    string clientId

    Client Id.

    string clientSecret

    Client Secret.

    string redirectUri

    Redirect Uri.

    RequestOptions requestOptions

    RequestOptions.

    Returns
    Type Description
    OAuthCredential

    The OAuth credential.

    Exceptions
    Type Condition
    MercadoPagoException

    If a unexpected exception occurs.

    MercadoPagoApiException

    If the API returns a error.

    | Edit this page View Source

    CreateOAuthCredentialAsync(string, string, RequestOptions, CancellationToken)

    Creates an OAuth credentials asynchronously using access token as client secret.

    Declaration
    public Task<OAuthCredential> CreateOAuthCredentialAsync(string authorizationCode, string redirectUri, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string authorizationCode

    Authorization code.

    string redirectUri

    Redirect Uri.

    RequestOptions requestOptions

    RequestOptions.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<OAuthCredential>

    A task whose the result is the OAuth credential.

    Exceptions
    Type Condition
    MercadoPagoException

    If a unexpected exception occurs.

    MercadoPagoApiException

    If the API returns a error.

    | Edit this page View Source

    CreateOAuthCredentialAsync(string, string, string, string, RequestOptions, CancellationToken)

    Creates an OAuth credentials asynchronously with client id and client secret.

    Declaration
    public Task<OAuthCredential> CreateOAuthCredentialAsync(string authorizationCode, string clientId, string clientSecret, string redirectUri, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string authorizationCode

    Authorization code.

    string clientId

    Client Id.

    string clientSecret

    Client Secret.

    string redirectUri

    Redirect Uri.

    RequestOptions requestOptions

    RequestOptions.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<OAuthCredential>

    A task whose the result is the OAuth credential.

    Exceptions
    Type Condition
    MercadoPagoException

    If a unexpected exception occurs.

    MercadoPagoApiException

    If the API returns a error.

    | Edit this page View Source

    GetAuthorizationURL(string, string, RequestOptions)

    Gets the URL to generate authorization code.

    Declaration
    public string GetAuthorizationURL(string appId, string redirectUri, RequestOptions requestOptions = null)
    Parameters
    Type Name Description
    string appId

    Application ID.

    string redirectUri

    Redirect URL configured.

    RequestOptions requestOptions

    RequestOptions.

    Returns
    Type Description
    string

    A task whose the result is the URL to obtain the authorization code.

    Exceptions
    Type Condition
    MercadoPagoException

    If a unexpected exception occurs.

    MercadoPagoApiException

    If the API returns a error.

    | Edit this page View Source

    GetAuthorizationURLAsync(string, string, RequestOptions, CancellationToken)

    Gets async the URL to generate authorization code.

    Declaration
    public Task<string> GetAuthorizationURLAsync(string appId, string redirectUri, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string appId

    Application ID

    string redirectUri

    Redirect URL configured

    RequestOptions requestOptions

    RequestOptions

    CancellationToken cancellationToken

    Cancellation token

    Returns
    Type Description
    Task<string>

    A task whose the result is the URL to obtain the authorization code.

    Exceptions
    Type Condition
    MercadoPagoException

    If a unexpected exception occurs.

    MercadoPagoApiException

    If the API returns a error.

    | Edit this page View Source

    RefreshOAuthCredential(string, RequestOptions)

    Refresh OAuth credential.

    Declaration
    public OAuthCredential RefreshOAuthCredential(string refreshToken, RequestOptions requestOptions = null)
    Parameters
    Type Name Description
    string refreshToken

    Refresh token.

    RequestOptions requestOptions

    RequestOptions.

    Returns
    Type Description
    OAuthCredential

    The refreshed OAuth credential.

    Exceptions
    Type Condition
    MercadoPagoException

    If a unexpected exception occurs.

    MercadoPagoApiException

    If the API returns a error.

    | Edit this page View Source

    RefreshOAuthCredentialAsync(string, RequestOptions, CancellationToken)

    Refresh OAuth credential async.

    Declaration
    public Task<OAuthCredential> RefreshOAuthCredentialAsync(string refreshToken, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string refreshToken

    Refresh token.

    RequestOptions requestOptions

    RequestOptions.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<OAuthCredential>

    A task whose the result is the refreshed OAuth credential.

    Exceptions
    Type Condition
    MercadoPagoException

    If a unexpected exception occurs.

    MercadoPagoApiException

    If the API returns a error.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX