MIT Payments
The MIT (Merchant Initiated Transactions) payments are used in scenarios where the buyer is not present at the time of the payment, for example, when the buyer has to pay a month subscription for a service.
How to proceed
To enable MIT payments, first you have to Initiate a
Payment setting the cit_code
as initial
in the body. This would let the buyer to perform the first payment by
using our Hosted Payment Page and will need to authorize the payment by providing the required information - depending on the chosen payment method.
For the initial payment, we support both a zero amount and a non-zero amount.
- Sandbox
- Live
POST https://api.sandbox.getpaid.io/payments
Sample request
curl -X POST \
https://api.sandbox.getpaid.io/payments \
-H 'authorization: Bearer {{your_access_token}}' \
-H 'content-type: application/json' \
-d '{
"amount_minor": 1000,
"currency": "EUR",
"payment_method": {
"type": "user_selected"
},
"reference": "ORD-123456",
"description": "Your Haircutz appointment at Emma Stone Hair Salon",
"integration": {
"type": "hosted",
"generate_qr_code": true
},
"routing": {
"platform": {
"amount_minor": 100,
"processing_fee_contribution": 50
},
"merchants": [
{
"type": "seller",
"id": "acc_4zjjxn0nm1tnweqbttedkvnsc8",
"reference": "ORD-123456",
"amount_minor": 850,
"processing_fee_contribution": 25
},
{
"type": "merchant",
"id": "acc_4djj3n0hm1tn2eqwetedkvnsc3",
"reference": "ORD-123456",
"amount_minor": 50,
"processing_fee_contribution": 25
}
]
},
"urls": {
"redirect": "https://haircutz.co/checkout/complete?order_id=ORD-123456",
"webhook": "https://webhooks.haircutz.co/getpaid"
},
"cit_mode": "initial"
}'
POST https://api.getpaid.io/payments
Sample request
curl -X POST \
https://api.getpaid.io/payments \
-H 'authorization: Bearer {{your_access_token}}' \
-H 'content-type: application/json' \
-d '{
"amount_minor": 1000,
"currency": "EUR",
"payment_method": {
"type": "user_selected"
},
"reference": "ORD-123456",
"description": "Your Haircutz appointment at Emma Stone Hair Salon",
"integration": {
"type": "hosted",
"generate_qr_code": true
},
"routing": {
"platform": {
"amount_minor": 100,
"processing_fee_contribution": 50
},
"merchants": [
{
"type": "seller",
"id": "acc_4zjjxn0nm1tnweqbttedkvnsc8",
"reference": "ORD-123456",
"amount_minor": 850,
"processing_fee_contribution": 25
},
{
"type": "merchant",
"id": "acc_4djj3n0hm1tn2eqwetedkvnsc3",
"reference": "ORD-123456",
"amount_minor": 50,
"processing_fee_contribution": 25
}
]
},
"urls": {
"redirect": "https://haircutz.co/checkout/complete?order_id=ORD-123456",
"webhook": "https://webhooks.haircutz.co/getpaid"
},
"cit_mode": "initial"
}'
After the initial payment is completed, you can use the Authorize MIT payment endpoint to perform the subsequent
payments, without the need of the buyer to authorize the payment again. Please note that it's required to provide the
initial_payment_id
.
- Sandbox
- Live
POST https://api.sandbox.getpaid.io/payments/authorize
Sample request
curl -X POST \
https://api.sandbox.getpaid.io/payments/authorize \
-H 'authorization: Bearer {{your_access_token}}' \
-H 'content-type: application/json' \
-d '{
"initial_payment_id": "pay_473cr1y0ghbyc3m1yfbwvn3nxx",
"amount_minor": 1000,
"currency": "EUR",
"reference": "ORD-123456",
"description": "Your Haircutz appointment at Emma Stone Hair Salon",
"routing": {
"platform": {
"amount_minor": 100,
"processing_fee_contribution": 50
},
"merchants": [
{
"type": "seller",
"id": "acc_4zjjxn0nm1tnweqbttedkvnsc8",
"reference": "ORD-123456",
"amount_minor": 900,
"processing_fee_contribution": 50
}
]
},
"urls": {
"webhook": "https://webhooks.haircutz.co/getpaid"
}
}'
POST https://api.getpaid.io/payments/authorize
Sample request
curl -X POST \
https://api.getpaid.io/payments/authorize \
-H 'authorization: Bearer {{your_access_token}}' \
-H 'content-type: application/json' \
-d '{
"initial_payment_id": "pay_473cr1y0ghbyc3m1yfbwvn3nxx",
"amount_minor": 1000,
"currency": "EUR",
"reference": "ORD-123456",
"description": "Your Haircutz appointment at Emma Stone Hair Salon",
"routing": {
"platform": {
"amount_minor": 100,
"processing_fee_contribution": 50
},
"merchants": [
{
"type": "seller",
"id": "acc_4zjjxn0nm1tnweqbttedkvnsc8",
"reference": "ORD-123456",
"amount_minor": 900,
"processing_fee_contribution": 50
}
]
},
"urls": {
"webhook": "https://webhooks.haircutz.co/getpaid"
}
}'