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

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.

ParameterTypeDescriptionMandatory?
card.stored_credential_typeStringUse this field to store credentials for future payments.

Possible values:
* CARD_ON_FILE
* SUBSCRIPTION
* UNSCHEDULED_CARD_ON_FILE
* INSTALLMENTS
* NO_SHOW
* DELAYED_CHARGES
* REAUTHORIZATION
* RESUBMISSION
Yes
card.stored_credential_usageStringIndicates 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

Stored credential type

TypeDescription
CARD_ON_FILEAllow customers one-click payment or a smooth checkout process.
SUBSCRIPTIONTransactions are processed at a fixed, regular interval to which the user has given consent.
UNSCHEDULED_CARD_ON_FILETransaction that occurs in a non-fixed time.
INSTALLMENTSAgreement with the customer to initiate one or more future transactions over a period for a single purchase.
NO_SHOWPenalty fee charged to the customer when the terms of an agreement are not met.
DELAYED_CHARGESAdditional charge associated with an agreement between customer and merchant for services provided.
REAUTHORIZATIONExtend an expired authorization.
RESUBMISSIONValid when an authorization could not be performed due to insufficient funds and a cardholder-initiated purchase already occurred

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/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",
    },
   "order_id": "387ac7f5-9cbf-462e-ae41-971638788ccc",
   "notification_url": "http://merchant.com/notifications"
}

📘

API Reference

For more detail information on how to make a payment, check the API Reference section.