Skip to main content

Mercado Pago

Mercado Pago Integration

Create Payment Intent

Creates a payment intent and evaluates loyalty effects for Mercado Pago transactions.

Endpoint: POST /partners/mercadopago/payment-intents

Security:

  • Authentication requires:
    1. API Key in the x-api-key header

Request Headers Example:

x-api-key: your-api-key

Request Body:

{
"total": number,
"loyaltyMemberId": string,
"merchantId": string,
"referenceId": string,
"type": string,
"organizationKey": string,
"forceUserSubscription": boolean,
"storeId": string,
"rawQr": string,
"paymentId": string,
"postPayment": boolean,
"products": [
{
"sku": string,
"subTotal": number,
"total": number,
"quantity": number,
"description": string
}
],
"memberInfo": {
"loyaltyMemberId": string,
"userGovId": string,
"email": string,
"phone": string,
"firstName": string,
"lastName": string,
"data": object
}
}

Field Descriptions:

  • total: The total amount of the transaction
  • loyaltyMemberId: The customer's loyalty program ID. For Argentina, this can be the DNI (Documento Nacional de Identidad)
  • merchantId: The merchant's identification number processing this transaction. For Argentina, this is the CUIT number
  • referenceId: Any optional business-related reference ID for internal tracking
  • type: The payment intent transaction type. For QR payments, use "qr"
  • storeId: The store Id or PBL of the terminal reporting the purchase
  • rawQr: Optional QR scanned by the customer when doing the payment
  • organizationKey: Organization identifier. Use "axion"
  • forceUserSubscription: When set to true, automatically subscribes non-members to the loyalty program. Must be true for the intent to be applied
  • paymentId: Unique transaction identifier. Must be unique across all transactions
  • postPayment: Optional and set to true if the payment is being reported after the transaction has occurred
  • products: (Optional) List of products included in the purchase transaction
    • sku: Product identifier
    • subTotal: Product price before discounts
    • total: Final product price
    • quantity: Number of units
    • description: Product description
  • memberInfo: Optional customer information required for new user onboarding
    • loyaltyMemberId: Customer's loyalty ID
    • userGovId: Government ID
    • email: Customer's email
    • phone: Optional customer's phone number
    • firstName: Customer's first name
    • lastName: Customer's last name
    • data: Additional optional custom data

Required Fields:

  • total
  • paymentId
  • type
  • organizationKey
  • loyaltyMemberId

Response:

Success (200):

{
"loyaltyMemberId": string,
"tier": string,
"isNewMember": boolean,
"accountBalances": [
{
"balance": number,
"newAccrual": number,
"unitName": string,
"accountId": string
}
],
"missionsStatus": [
{
"currentCounter": number,
"newCounter": number,
"achieved": boolean,
"goal": number,
"timesAchieved": number,
"missionId": string,
"userMessage": string,
}
],
"effects": [
{
"effectId": "discount",
"discount": number,
"discountedTotal": number,
"discountType": string
}
]
}

Response Field Descriptions:

  • loyaltyMemberId: The customer's loyalty program identifier
  • tier: The current tier level of the member
  • isNewMember: Indicates if the member was onboarded during this transaction
  • accountBalances: (Optional) Points accrual information and affected accounts after the transaction
    • balance: Current balance after the transaction
    • newAccrual: Points earned in this transaction
    • unitName: Name of the points unit
    • accountId: Identifier of the affected account
  • missionsStatus: (Optional) Information about missions affected by this transaction
    • currentCounter: Mission count status before this transaction. This is reset to 0 on next transaction if achieved.
    • newCounter: Counter after the effect was applied. This is reset to 1 on next transaction if achieved.
    • achieved: Indicates if the mission was achieved by this transaction
    • goal: Target value for mission completion
    • timesAchieved: Total number of times the mission has been achieved, including this transaction
    • missionId: Mission identifier (e.g., "axion-cargas" for Axion ON)
    • userMessage: Optional user message that can be used to notify the end user
  • effects: (Optional) Additional effects applied to the transaction
    • effectId: Type of effect (e.g., "discount")
    • discount: Amount of discount applied
    • discountedTotal: Final total after discount
    • discountType: Type of discount applied

Error (400 Bad Request):

  • Returned when an invalid request payload is found
  • No response body is provided

Error (404 Not Found):

  • Returned when a member cannot be created in the loyalty program
  • No response body is provided

Error (409 Conflict):

  • Returned when another transacion with same paymentId is found.
  • No response body is provided