Plug-in WooCommerce & Wordpress

Quelle est la différence entre WordPress et WooCommerce ?

WordPress est une plateforme de gestion de contenu incroyablement populaire, utilisée par des millions de personnes pour créer et gérer leurs sites Web.

WooCommerce est en réalité un plugin pour WordPress, qui ajoute des fonctionnalités de vente en ligne à votre site existant.

Le plug-in MOBIP vous permet d'ajouter une module de paiement à aussi bien WooCommerce qu'à Wordpress


Comment intégrer le plug-in Mobip dans WordPress ou WooCommerce ?


Comment fonctionne le plug-in MOBIP ? : Voir la video ici.

Allez dans Extensions / Ajouter / Téléverser une extension



Télécharger le plug-in MOBIP pour WOOCOMMERCE et WORDPRESS : télécharger ici




Allez dans WooCommerce / Settings / Payments



Paramétrez votre compte dans WooCommerce/Settings/Payments/Mobip






API Documentation

All input parameters must be passed as 'multipart/form-data'

GET
/api/2.0/mobip/get_token
 (Public)

Description : Get a connection token to reuse at each call.

Inputs
Attribute Required Description Set a value
api_account_id as string Y API account id
api_ttl as string N token time to leave in hours. . Set to 1h by default
api_secret_key as string Y API secret key of your account
Go to top

Returns

Default return format is : JSON

Attribute Description
access_token as string token id to reuse in each call. This token will be deleted after 1H on inactivity.
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code
return_message as string Only if error, will return a error message to explain return_code

Response




POST
/api/2.0/mobip/login
 (Public)

Description :

Inputs
Attribute Required Description Set a value
access_token as string Y Connection token gave by connect/get_token
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code

Response




POST
/api/2.0/mobip/send_payment_request
 (Public)

Description : This call will send a payment request by email or SMS to the customer.

Inputs
Attribute Required Description Set a value
item_amount_in_cents as integer Y Price of your item to sale without taxes in cents of your account's currency.
tax_amount as integer Y Total of taxes to add on item price. In cents of account's currency
redirect_url as string Y URL where MOBIP's server will redirect the user after finishing a transaction. Should be a page on merchant's webiste. The expected url format is : [protocol]://[url] like https://mywebpage.html
call_back_url as string N URL callback who will receive transaction the asynchronous response of the transaction. Ex : https://myserver.com/my_callback.php?resp_code=PROCESSED. resp_code={PROCESSED, CANCELLED, ERROR} , Once processed, you have to use mobip/isvalid to get the status of the transaction who can be PAID, DENIED or CANCELLED
track_id as string N Optional : Your own transaction id or reference for tracking purpose This track_id is send on the callback message when the payment is done.
item_name as string Y Name or description of the product or service you are selling
access_token as string Y Connection token gave by connect/get_token
retry_period as string N number of days before MOBIP resend automatically the payment link. If not set, default value is 0
retry_attempts as string N Maximum number of attemtps to resend automatically a payment link. Default value is 3 if not set.
transaction_ttl as string N transaction time to live in days. Default value is 365 if not set.
language as string N Language used for payment request. EN is default. Languages availables : {EN,FR}
customer_name as string N Customer name, use it in order to prefill payment form
customer_email as string N customer email to send receipt
media as string Y Will send the payment request by the selected Media, SMS our EMAIL values = {SMS,EMAIL}
customer_phone as string N Always put international prefix for phone numbers +1 for US +33 for France
Go to top

Returns

Default return format is : JSON

Attribute Description
return_message as string Only if error, will return a error message to explain return_code
url_checkout as string url to payment form
track_id as string Your track_id sent in your request
url_qr as string Url to the QR code associated with this transaction
raw_qr as string Binary string of the QR Code in a png format
trid as string Unique transaction id. Use this id with the isValid endpoint
return_code as string return code, 0 if OK. See error codes tab at the end.

Response




POST
/api/2.0/mobip/create_one_use_qr
 (Public)

Description :

Inputs
Attribute Required Description Set a value
item_name as string Y Name or description of the product or service you are selling
language as string N Language used for payment request. EN is default. Languages availables : {EN,FR}
track_id as string N Optional : Your own transaction id or reference for tracking purpose
tax_amount_in_cents as integer Y Total amount without taxes of transaction in cents of your account's currency. Means if your account is set in USD, this will be USD.
item_amount_in_cents as integer Y Item price without taxes
customer_name as string N Customer name, use it in order to prefill payment form
customer_email as string N customer email to send receipt
call_back_url as string Y URL callback who will receive transaction the asynchronous response of the transaction. Ex : https://myserver.com/my_callback.php?resp_code=PROCESSED. resp_code={PROCESSED, CANCELLED, ERROR} , Once processed, you have to use mobip/isvalid to get the status of the transaction who can be PAID, DENIED or CANCELLED
redirect_url as string Y URL where MOBIP's server will redirect the user after finishing a transaction. Should be a page on merchant's webiste. The expected url format is : [protocol]://[url] like https://mywebpage.html
transaction_ttl as string N transaction time to live in days. Default value is 365 if not set.
access_token as string Y Connection token gave by connect/get_token
customer_phone as string N Always put international prefix for phone numbers +1 for US +33 for France
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
url_qr as string url to the QR image on our server.
return_message as string Only if error, will return a error message to explain return_code
trid as string Unique transaction id. Use this id with the isValid endpoint
url_checkout as string url to payment form

Response




POST
/api/2.0/mobip/create_reusable_qr
 (Public)

Description :

Inputs
Attribute Required Description Set a value
access_token as string Y Connection token gave by connect/get_token
item_amount as integer Y Item price in cents of currency account. (EUR is default).
item_name as string Y Name or description of the product or service you are selling
tax_amount as integer Y Total of taxes to add to product amount.
item_photo as string Y url of picture discribing the item. The content will be uploaded on the platform.
item_video as string N url to video describing the product
item_message as string N Shot message to add on the pop up
item_reference as string N Item reference or external or internal system
item_category as string N Optional info, item category
item_brand as string N Optional info, Brand
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
qr_id as string id of reusable QR.
url_qr as string url to the QR image on our server.
url_checkout as string url to payment form
return_message as string Only if error, will return a error message to explain return_code

Response




GET
/api/2.0/mobip/is_valid
 (Public)

Description :

Inputs
Attribute Required Description Set a value
trid as string Y Transaction id.
access_token as string Y Connection token gave by connect/get_token
is_multi_invoice as boolean N Set as true or 1 to receive additionnal data for multi invoice payments.
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code
transaction_status as string Possible values ={ PAID, DENIED, PENDING, CANCELLED, ERROR}
track_id as string Information such as list of invoices paid. Is set manually when you create a transaction
reason as string Is filled when a transaction fails
payment_method as string payment_method
desc as string item description
isRefunded as string is set to 'true' when a transaction is refunded
transaction_datetime as string transaction_datetime
external_accountid as string external_accountid

Response




POST
/api/2.0/mobip/resend
 (Public)

Description :

Inputs
Attribute Required Description Set a value
media as string Y Will send the payment request by the selected Media, SMS our EMAIL values = {SMS,EMAIL}
trid as string Y Transaction id.
access_token as string Y Connection token gave by connect/get_token
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code

Response




POST
/api/2.0/mobip/cancel_transaction
 (Public)

Description :

Inputs
Attribute Required Description Set a value
trid as string Y Transaction id.
access_token as string Y Connection token gave by connect/get_token
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code

Response




GET
/api/2.0/mobip/get_stats
 (Public)

Description :

Inputs
Attribute Required Description Set a value
day as string Y format is YYYY-MM-DD, if empty, no file is generated
access_token as string Y Connection token gave by connect/get_token
get_gz_file as boolean N if get_gz_file is equal to '1' , 'true', or 'on' => Then we return a url to a gz file otherwise the data are returned in JSON or XML. By default, this option is not set.
month_period as string Y format is YYYY-MM, current month is used if empty
Go to top

Returns

Default return format is : JSON

Attribute Description
url as string URL vers le fichier de stat à récupérer. Le fichier reste présent pendant 24H
return_message as string Only if error, will return a error message to explain return_code
return_code as string return code, 0 if OK. See error codes tab at the end.

Response




GET
/api/2.0/mobip/get_transaction
 (Public)

Description :

Inputs
Attribute Required Description Set a value
access_token as string Y Connection token gave by connect/get_token
trid as string Y Transaction id.
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
transaction_data as array All data for transaction identified by trid
return_message as string Only if error, will return a error message to explain return_code

Response




GET
/api/2.0/mobip/get_invoice_list
 (Public)

Description :

Inputs
Attribute Required Description Set a value
access_token as string Y Connection token gave by connect/get_token
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
invoice_data as array List of all invoice_id, invoice_date, amount
return_message as string Only if error, will return a error message to explain return_code

Response




GET
/api/2.0/mobip/get_invoice
 (Public)

Description :

Inputs
Attribute Required Description Set a value
invoice_id as string Y An invoice_id coming from get_invoices_list
access_token as string Y Connection token gave by connect/get_token
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code
invoice_data as array All invoice data for invoice_id

Response




POST
/api/2.0/mobip/set_external_invoices
 (Public)

Description : Import external invoices list

Inputs
Attribute Required Description Set a value
BatchId as string N External Id to identify data entry
InvoicesLists as array Y JSON formatted list like : "InvoicesLists":
[{
"CustomerId": "custom_1",
"CustomerPhone": "0607922222",
"CustomerEmail": "custom1@email.com",
"CustomerBalance_in_cents ": "3000",
"CustomerBalance_Date ": "2023-01-03",
[
{ "InvId": "inv_000", "InvDate ": "2023-01-01", "InvDueDate ": "2023-02-01", "InvLbl": "Facture de ABC", "Amount_in_cents ": "35000", "InvStatus ": "status_1" },
{ "InvId": "inv_002", "InvDate ": "2023-02-01", "InvDueDate ": "2023-03-01", "InvLbl": "Facture de XYZ", "Amount_in_cents ": "33000", "InvStatus ": "status_1" } ]},
{
"CustomerId": "custom_2",
"CustomerPhone": "0607922222",
"CustomerEmail": "custom2@email.com",
"CustomerBalance_in_cents ": "1000",
"CustomerBalance_Date ": "2023-01-03",
[
{ "InvId": "inv_003", "InvDate ": "2023-01-01", "InvDueDate ": "2023-02-01", "InvLbl": "Facture de ABC", "Amount_in_cents ": "35000", "InvStatus ": "status_1" },
{ "InvId": "inv_004", "InvDate ": "2023-02-01", "InvDueDate ": "2023-03-01", "InvLbl": "Facture de XYZ", "Amount_in_cents ": "33000", "InvStatus ": "status_1" }
]},
]
}
access_token as string Y Connection token gave by connect/get_token
ExternalSourceId as string Y External Source ID
transfer_mode as string N Possible values : {'insert' , 'reset_then_insert', 'smartreset_then_insert'} ; Default value is 'insert'
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code

Response




POST
/api/2.0/mobip/set_external_invoice_status
 (Public)

Description : Map the external invoice statuses with Mobip's statuses

Inputs
Attribute Required Description Set a value
access_token as string Y Connection token gave by connect/get_token
pending as string Y Facture non échue
due as string Y A régler
fully_paid as string Y Payée
partially_paid as string Y Partiellement payée
ExternalSourceId as string Y Identifiant du système externe
Go to top

Returns

Default return format is : JSON

Attribute Description
return_message as string Only if error, will return a error message to explain return_code
return_code as string return code, 0 if OK. See error codes tab at the end.

Response




GET
/api/2.0/mobip/get_external_invoices
 (Public)

Description : get the list of external invoices

Inputs
Attribute Required Description Set a value
access_token as string Y Connection token gave by connect/get_token
InvoicesList as string N List of invoices separated with a |
ExternalSourceId as string Y External Source ID
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code
InvoicesList as array JSON array of the invoices

Response




GET
/api/2.0/mobip/get_external_invoices_status
 (Public)

Description : get the mapping of the statuses between MOBIP and external source

Inputs
Attribute Required Description Set a value
ExternalSourceId as string Y External Source ID
access_token as string Y Connection token gave by connect/get_token
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code
InvoiceStatusesList as array JSON array of the statuses

Response




GET
/api/2.0/mobip/get_account_by_external_id
 (Public)

Description :

Inputs
Attribute Required Description Set a value
access_token as string Y Connection token gave by connect/get_token
external_account_id as string Y external_account_id identifies the account to retrieve
document_only as boolean N if true return only the document data from document_list all other values are not return.
document_list as string N Optional, by default no document are returned.
Enter here the list of document you want to download. Each element is separated by a
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code
account_data as array List of all the account data : attribute_name, attribute_type, attribute_value, is_updatable ...

Response




GET
/api/2.0/mobip/get_account
 (Restricted)

Description :

Inputs
Attribute Required Description Set a value
document_only as boolean N if true return only the document data from document_list all other values are not return.
access_token as string Y Connection token gave by connect/get_token
uid as string Y user_id. Identifies the account to retrieve
document_list as string N Optional, by default no document are returned.
Enter here the list of document you want to download. Each element is separated by a
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
return_message as string Only if error, will return a error message to explain return_code
account_data as array List of all the account data : attribute_name, attribute_type, attribute_value, is_updatable ...

Response




POST
/api/2.0/mobip/update_account
 (Restricted)

Description :

Inputs
Attribute Required Description Set a value
access_token as string Y Connection token gave by connect/get_token
account_data as array Y array structured like this : ['account_attribute_name'] = value in JSON format. List of allowed parameters is :
External_AccountID,
Public_Payment_Provider_key,
Private_Payment_Provider_key,
Payment_Provider_login
uid as string Y user_id. Identifies the account to update.
Go to top

Returns

Default return format is : JSON

Attribute Description
return_message as string Only if error, will return a error message to explain return_code
return_code as string return code, 0 if OK. See error codes tab at the end.

Response




POST
/api/2.0/neosystems/set_mobip_transactions
 (Restricted)

Description : Set a list of transactions as processed by neosystems. That means, remove these transactions from neosystems/get_mobip_transactions

Inputs
Attribute Required Description Set a value
trid_list as string Y List of mobip_trid to remove. each element must be separated by a pipe
access_token as string Y Connection token gave by connect/get_token
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
removed_transactions_list as array list of all removed transactions.

Response




GET
/api/2.0/neosystems/get_mobip_transactions
 (Restricted)

Description : Get list of mobip transactions to process by NEOSYSTEMS

Inputs
Attribute Required Description Set a value
limit as string N Set the maximum number of lines to retrieve. If nothing is set will send all the data
access_token as string Y Connection token gave by connect/get_token
Go to top

Returns

Default return format is : JSON

Attribute Description
return_code as string return code, 0 if OK. See error codes tab at the end.
transactions_list as array All transactions to process : id_flux, merchant_name, mobip_merchant_id, amount, fees, customer_name, customer_email ...

Response



Error codes

Error code Description
0 Execution was OK
1 Invalid API Key
2 Invalid connection token
3 Connexion token expired
4 Invalid argument : Input argument does not exist
5 Invalid argument : Wrong type
6 Invalid argument : a requiered argument is missing.
7 IP not in whitelist. Please contact support team
8 Caller's IP does not match token's IP
997 Warning message
998 FATAL_ERROR
999 Default generated method : This method is not implemented yet