Merchant Initiated Transactions
Learn how to make a Merchant Initiated Transaction.
Categorize a transaction
Merchant Initiated Transactions (MIT) are payment transactions that are initiated by the merchant on behalf of the customer. In MITs, the merchant has control over the transaction and is authorized to charge the customer's account or credit card based on predefined terms and conditions agreed upon by the customer.
Payment examples:
- Subscription payments. A customer signs up for a subscription service and the merchant is allowed to collect periodic payments to the customer's account.
- Automatic renewals. In case a customer has opted for automatic renewals of services, the merchant can initiate the transaction without explicit customer approval.
Types of transactions
CIT: Customer Initiated Transactions
Payment transactions that are initiated by the customer.
For example, online purchases.
MIT: Merchant Initiated Transactions
Payment transactions that are initiated by the merchant and have already been approved by the customers to pay on their behalf.
For example, subscription payments or automatic renewals.
Create a MIT payment
Stored credentials
In order to indicate the type of transaction, use the parameters stored_credentials_type
and stored_credentials_usage
inside the Card Object.
Parameter | Type | Description | Mandatory? |
---|---|---|---|
card.stored_credential_type | String | Use this field to store credentials for future payments. Possible values: * CARD_ON_FILE * SUBSCRIPTION * UNSCHEDULED_CARD_ON_FILE * INSTALLMENTS * NO_SHOW * DELAYED_CHARGES * REAUTHORIZATION * STANDING_ORDER | Yes |
card.stored_credential_usage | String | Indicates if this is the first time the token is used (an initial payment) or if the token has already been used for a previous payment (subsequent payment). Possible values: * FIRST * USED | Yes |
card.network_payment_reference | String | This is the Network Transaction Reference you can find in the response to the first payment —highly recommended for Merchant Initiated Transactions (MIT). | Optional |
Network Transaction Reference
If the transaction is initiated by the customer (CIT), the network transaction reference will be found on the card.network_tx_reference
field. These references are unique identifiers for each original authorization request.
-
Visa. The Visa Transaction Identifier (Transaction ID) is a numeric value up to 15 digits in length.
- Example of a Visa Transaction ID:
987654321234567
- Example of a Visa Transaction ID:
-
Mastercard. The Mastercard Trace ID is created from the Financial Network Code, Banknet Reference Number, and Banknet Settlement Date.
- Example of a Mastercard Trace ID:
MCCABC1XY0101
- Example of a Mastercard Trace ID:
Stored credential type
Type | Description |
---|---|
CARD_ON_FILE | Allow customers one-click payment or a smooth checkout process. |
SUBSCRIPTION | Transactions are processed at a fixed, regular interval to which the user has given consent. |
UNSCHEDULED_CARD_ON_FILE | Transaction that occurs in a non-fixed time. |
INSTALLMENTS | Agreement with the customer to initiate one or more future transactions over a period for a single purchase. |
NO_SHOW | Penalty fee charged to the customer when the terms of an agreement are not met. |
DELAYED_CHARGES | Additional charge associated with an agreement between customer and merchant for services provided. |
REAUTHORIZATION | Extend an expired authorization. |
RESUBMISSION | Valid when an authorization could not be performed due to insufficient funds and a cardholder-initiated purchase already occurred |
STANDING_ORDER | Consumer agrees to store the credential-on-file and initiates the first transaction in a series intended to be for a variable amount and a fixed frequency. |
Example request
curl -X POST \
-H 'X-Date: 2018-02-20T15:44:42.310Z' \
-H 'X-Login: {x-login}' \
-H 'X-Trans-Key: {x-trans-key}' \
-H 'Content-Type: application/json' \
-H 'X-Version: 2.1' \
-H 'User-Agent: MerchantTest / 1.0 ' \
-H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1...' \
-d '{body}'
https://api.dlocal.com/secure_payments
{
"amount": 120.00,
"currency" : "USD",
"country": "BR",
"payment_method_id" : "CARD",
"payment_method_flow" : "DIRECT",
"payer":{
"name" : "John Doe",
"email" : "[email protected]",
"document" : "53033315550",
"phone": "9908734801"
},
"card":{
"holder_name" : "John Doe",
"number" : "4111111111111111",
"cvv" : "123",
"expiration_month" : 10,
"expiration_year" : 2040,
"save" : true,
"stored_credential_type": "SUBSCRIPTION",
"stored_credential_usage": "FIRST",
"network_payment_reference": "987654321234567"
},
"order_id": "387ac7f5-9cbf-462e-ae41-971638788ccc",
"notification_url": "http://merchant.com/notifications"
}
{
"id": "T-4-704f49ba-46e9-49a3-81c6-beac52cba6d8",
"amount": 120,
"currency": "USD",
"payment_method_id": "CARD",
"payment_method_type": "CARD",
"payment_method_flow": "DIRECT",
"country": "BR",
"card": {
"holder_name": "John Doe",
"expiration_month": 10,
"expiration_year": 2040,
"brand": "VI",
"last4": "1111",
"bin": "411111",
"country": "BR",
"type": "CREDIT",
"stored_credential_type": "SUBSCRIPTION",
"stored_credential_usage": "FIRST"
},
"created_date": "2025-04-08T17:13:48.000+0000",
"status": "PAID",
"status_detail": "The payment was paid.",
"status_code": "200",
"order_id": "387ac7f5-9cbf-462e-ae41-971638788ccc",
"notification_url": "http://merchantsite.com/notifications",
}
API Reference
For more detail information on how to make a payment, check the API Reference section.
Updated 4 days ago