Skip to main content

Merchant-initiated transactions

A merchant-initiated transaction (MIT) is a payment initiated by the merchant as part of an automated subscription or instalment series. An MIT is a subsequent payment in a recurring series that was established by an initial CIT.

Card details must be supplied with a full PAN, expiry date and cardholder name, without a CVV. Alternatively, if the card information has been stored in our vault, then the vault instrument id can be used instead of card information.

MIT properties:​

As described in Credential-on-file payments, an MIT payment must include a credential_on_file object.

The credential_on_file object must include:

  • initiator: Must be set to merchant.

  • intent: Specifies the type of payment series the transaction belongs to and must be set to scheduled, unscheduled, or installment.

  • stage: For MITs, this must be set to subsequent.

  • initial_payment_ids: This is required for MITs and must contain one of the following properties:

    • paytently: If the initial CIT was processed through Paytently, pass the Paytently payment ID.
    • scheme: If the initial CIT was processed through another provider, pass the scheme transaction ID.
note

Details on required fields and validation can be found in our Open API specification.


POST https://api.paytently.io/payments

Request:​

curl --location 'https://sandbox.api.paytently.io/payments'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer token_here'
--data-raw '{
"reference": "ord123",
"amount": 100,
"currency": "EUR",
"customer": {
"id": "customer123",
"first_name": "Joe",
"last_name": "Bloggs",
"birth_date": "1991-06-03",
"nationality": "GBR",
"contact": {
"phone": {
"country_code": "44",
"number": "07700900123"
},
"email": "email@example.com"
}
},
"method": {
"type": "card",
"card": {
"number": "4000000000002503",
"expiry_year": "28",
"expiry_month": "06",
"name_on_card": "J Bloggs"
}
},
"credential_on_file": {
"initiator": "merchant",
"intent": "scheduled",
"stage": "subsequent",
"initial_payment_ids": {
"paytently": "pay_12345"
}
},
"billing_address": {
"line_one": "80 Queens Road",
"city": "Manchester",
"postal_code": "M63X 7TH",
"country": "GBR"
},
"device_ip_address": "123.123.123.123",
"urls": {
"webhook": "https://example.com/paytently/webhooks",
"merchant_website": "https://example.com"
},
"metadata": {
"key": "value"
}
}'

Response:​

{
"id": "pay_12345",
"status": "pending",
"_links": {
"self": {
"href": "https://sandbox.api.paytently.io/payments/pay_12345",
"method": "GET"
},
"authorize": {
"href": "https://sandbox.payredirect.io/authorize/pay_12345",
"method": "GET"
}
}
}