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:
- API Key in the
x-api-keyheader
- API Key in the
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 transactionloyaltyMemberId: 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 numberreferenceId: Any optional business-related reference ID for internal trackingtype: The payment intent transaction type. For QR payments, use "qr"storeId: The store Id or PBL of the terminal reporting the purchaserawQr: Optional QR scanned by the customer when doing the paymentorganizationKey: 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 appliedpaymentId: Unique transaction identifier. Must be unique across all transactionspostPayment: Optional and set to true if the payment is being reported after the transaction has occurredproducts: (Optional) List of products included in the purchase transactionsku: Product identifiersubTotal: Product price before discountstotal: Final product pricequantity: Number of unitsdescription: Product description
memberInfo: Optional customer information required for new user onboardingloyaltyMemberId: Customer's loyalty IDuserGovId: Government IDemail: Customer's emailphone: Optional customer's phone numberfirstName: Customer's first namelastName: Customer's last namedata: Additional optional custom data
Required Fields:
totalpaymentIdtypeorganizationKeyloyaltyMemberId
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 identifiertier: The current tier level of the memberisNewMember: Indicates if the member was onboarded during this transactionaccountBalances: (Optional) Points accrual information and affected accounts after the transactionbalance: Current balance after the transactionnewAccrual: Points earned in this transactionunitName: Name of the points unitaccountId: Identifier of the affected account
missionsStatus: (Optional) Information about missions affected by this transactioncurrentCounter: 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 transactiongoal: Target value for mission completiontimesAchieved: Total number of times the mission has been achieved, including this transactionmissionId: 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 transactioneffectId: Type of effect (e.g., "discount")discount: Amount of discount applieddiscountedTotal: Final total after discountdiscountType: 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