Register card in the maib ecomm system

API endpoint (POST)

https://api.maibmerchants.md/v1/savecard-oneclick

Request parameters (body)

Parameter
Required
Type
Description

billerExpiry

YES

string(4)

The date (month/year) until which the card data will be saved in maib ecomm system.

Format: MMYY (e.g: 1229 -> 31 December 2029 / 23:59:59).

If the validity of the card is lower than the value passed in this parameter, then the card data will be kept until the date of validity of the card.

clientIp

YES

string(15)

Customer IP

amount

NO*

string(2)

Transaction amount. Format: X.XX

E.g: 10.25 (currency=USD) means $10 and 25 cents.

*If the parameter is passed, the amount will be debited from the Customer's account and the card data will be saved in the maib ecomm system.

*If the parameter is not passed, then the card data will be saved without debiting anything from the Customer's account.

currency

YES

string(4)

Transaction currency (MDL/EUR/USD).

language

NO

string(2)

Language maib ecomm checkout page.

Allowed values: ro/en/ru

If this parameter is not passed, the page will be displayed in English.

description

NO

string(124)

Payment description.

Displayed on maib ecomm checkout page.

clientName

NO

string(128)

Customer name

email

NO

string(40)

Customer email

phone

NO

string(40)

Customer phone

orderId

NO

string(36)

Order ID generated by Merchant website/app.

delivery

NO

number(decimal)

Shipping cost

items

NU

array

max. 50 items

The products or services ordered from the website/app.

  • id

no

string(36)

Product ID

  • name

no

string(128)

Product name

  • price

no

number(decimal)

Product price

  • quantity

no

integer(32)

Product quantity

callbackUrl

NO

string(2048)

The link where the Merchant will receive the final response with the transaction status and data.

If this parameter is not passed, its value will be taken from maibmerchants.

okUrl

NO

string(2048)

The link where the Customer will be redirected if the transaction was successful.

(GET request: okUrl + payId&orderId&billerId)

If this parameter is not passed, its value will be taken from maibmerchants.

failUrl

NO

string(2048)

The link where the Customer will be redirected if the transaction was failed.

(GET request: failUrl + payId&orderId)

If this parameter is not passed, its value will be taken from maibmerchants.

Example

{
"billerExpiry": "1225",
"amount": 6.25,
"currency": "EUR",
"clientIp": "135.250.245.121",
"language": "en",
"description": "Description",
"email": "customer@gmail.com",
"phone": "069123456",
"orderId": "123",
"delivery": 1.25,
"items": [
{
"id": "10",
"name": "Product 1",
"price": 2.50,
"quantity": 2
}
],
"callbackUrl": "https://example.com/callback",
"okUrl": "https://example.com/ok",
"failUrl": "https://example.com/fail"
}

Intermediate response parameters

Parameter
Type
Description

result

Object

Object containing the transaction identifier and redirect link.

  • payId

String

Transaction identifier assigned by maib ecomm

  • orderId

String

Order ID generated by Merchant website/app

  • payUrl

String

The link to the maib ecomm checkout page where the Customer must be redirected to enter their card details (or pay via Apple Pay/Google Pay).

ok

Boolean

Request/transaction processing status:

true - no errors;

false - an error occurred (error details will be in errors).

errors

Array

  • errorCode

String

Error code

  • errorMessage

String

Error description

  • errorArgs

Object

Object contains parameters with error details

Example

{
"result": {
"payId": "f16a9006-128a-46bc-8e2a-77a6ee99df75",
"orderId": "123",
"payUrl": "https://maib.ecommerce.md/ecomm01/ClientHandler?trans_id=rEsfhyIk8s9ypxkcS9fj/3C8FqA="
},
"ok": true
}

Final response parameters (on Callback Url)

Parameter
Type
Description

result

Object

Object containing transaction data.

  • payId

String(UUID)

Transaction identifier assigned by maib ecomm.

  • orderId

String

Order ID generated by Merchant website/app.

  • billerId

String(UUID)

Card identifier saved in maib ecomm system.

The merchant will initiate the following payments by passing this identifier in the request (execute-recurring).

  • billerExpiry

String

The date (month/year) until which the card data will be saved in maib ecomm system.

Format: MMYY (e.g: 1229 -> 31 December 2029 / 23:59:59).

If the validity of the card is lower than the value previously sent in the request, then in the response you will receive the card's expiration date.

  • status

String

OK - If the amount parameter has been passed and the transaction is successful (the card data has been registered).

PENDING - If the amount parameter was not passed (the card data has been registered).

  • statusCode

String

Transaction status code

  • statusMessage

String

Transaction status information message

  • threeDs

String

AUTHENTICATED - successfully authenticated.

  • rrn

String

RRN - Transaction ID generated by maib.

  • approval

String

Approval Code - The transaction approval code generated by the card issuing bank.

  • cardNumber

String

Masked number card.

  • amount

Number(decimal)

Transaction amount. Format: X.XX

  • currency

String

Transaction currency (MDL/EUR/USD).

signature

String

Response validation signature.

Example

{
"result": {
"payId": "f16a9006-128a-46bc-8e2a-77a6ee99df75",
"billerId": "t78i8006-458a-46bc-9e0a-89a6ee11df68",
"billerExpiry": "1225",
"orderId": "123",
"status": "OK",
"statusCode": "000",
"statusMessage": "Approved",
"threeDs": "AUTHENTICATED",
"rrn": "331711380059",
"approval": "327593",
"cardNumber": "510218******1124",
"amount": 6.25,
"currency": "EUR"
},
"signature": "r4KwwIUXQGHhcEM7C4um8o9rSrGEriTRcYQuBbmjEec="
}

Last updated