API sur les flux
Instructions pour l’intégration technique avec les systèmes LOVAT
Termes et abréviations
API – Application Programming Interface (interface de programmation d’applications). Ensemble d’appels fournis par le système pour l’intégration avec des produits logiciels externes.
Marchand – propriétaire d’une boutique en ligne.
Client – personne qui paie pour des biens ou des services.
Transaction – transfert de fonds pour des biens ou des services reçus par le client de la part du commerçant.
Token – chaîne de caractères secrets utilisée par le système pour identifier le commerçant et le site web par lequel la transaction est enregistrée.
Description de l’API
Méthode d’envoi.
Description de la méthode.
La méthode SEND met en œuvre la réception des données relatives à la transaction, en tenant compte du traitement et du calcul de la TVA et des frais de système.
URL du référent
La méthode est disponible à l’URL suivante :
https://merchant.vatcompliance.co/api/1/ send/{access_token}?if_digital={true/false}&if_vat_calculate={true/false}
Options d’achat
Les paramètres d’appel sont divisés en deux types :
- les paramètres de parcours (jeton)
Paramètres de requête (données de transaction)
Le jeton est généré dans le compte interne du commerçant lors de la première étape de l’ajout du site web. Vous pouvez l’obtenir auprès de votre gestionnaire ou le trouver dans la section Magasin – Paramètres.
The request parameters are generated by the merchant and sent to the server using the POST method in the application / x-www-form-urlencoded or application / json format
Services numériques
Parameter | Type/Example | Example Description | Validation |
transaction_id | String/ 555-yyy | Transaction ID | Maximum 255 characters. Not an empty value. |
transaction_datetime | DateTime / 2017-01-09T08:27:22 +00:00 | Date and time of the transaction in accordance with ISO 8601 GMT | Not an empty value. |
transaction_sum | String / 25 | Transaction Amount | Maximum 45 characters. Not an empty value. |
customer_ip | String / 127.0.0.1 | Customer’s IP address | Maximum 45 characters. |
currency | String / “usd”, “eur”, “rub”, “gbp” | Transaction Currency | Maximum 3 characters. Not an empty value. |
customer_phone_number | String / “+7 AAA BBB BB BB” | Customer’s phone number | Maximum 100 characters. |
arrival_country | String / “GBR” | All countries are specified as strings according to ISO 3166-1 alpha-3 | Maximum 3 characters. |
arrival_city | String / “London” | Arrival city | Maximum 255 characters. |
arrival_address_line | String / “Peckham Road” | Arrival address line | Maximum 255 characters. |
transaction_status |
String / “Success”, “Charge back”, “refund”, “Movement own goods” |
Transaction Status | Not an empty value. |
service_code | String / “1” |
Merchant service type code If the merchant does not send data on the type of service provided, the transaction is assigned the nominal principal type of merchant’s service that was specified at registration
|
Maximum 255 characters. Not an empty value. |
bank_card_number | String / “1234-****-****-****” | Bank card number of the buyer | Maximum 19 characters. |
payment_operator | String / “payonline” paypal” | Payment Operator | Maximum 45 characters. Not an empty value. |
payment_method_country | String / “USA” | Payment option by country. All countries are specified as strings according to ISO 3166-1 alpha-3 | Maximum 3 characters. Not an empty value. |
billing_country | String / “USA” | Billing country (address of the payment owner). All countries are specified as strings according to ISO 3166-1 alpha-3 | Maximum 3 characters. Not an empty value. |
billing_address | String / “111 First Street,Saratoga, CA 95070, US” | Billing address (address of the payment owner) | Maximum 255 characters. Not an empty value. |
Code de réponse du serveur
La réponse à la requête utilise le code HTTP de base
Code | Explanation | Response Content |
200 OK | Request Processed | |
400 BadRequest | Invalid request | { error : “Problem with data” } |
401 Unauthorized | Unauthorized access | { error : “Token is invalid.” } |
Exemple de requête pour les services numériques :
Exemple de demande de la console
curl -v POST 'http://https://merchant.vatcompliance.co/api/1/ send/5aae918d97964ff88df64b059c2cc0f8?if_digital=false&if_vat_calculate=true' --header "Content-Type: application/json" -d '{ "transaction_id": " ttt4565-85546", "transaction_datetime": "2017-01-09T08:27:22 +00:00", "transaction_sum": 25.99, "customer_ip": "127.0.0.1", "customer_phone_number": "+7 677 ** * **", }'
Biens
Parameter | Type/Example | Example Description | Validation |
transaction_id | String/ 555-yyy | Transaction ID | Maximum 255 characters. Not an empty value. |
transaction_datetime | DateTime / 2017-01-09T08:27:22 +00:00 | Date and time of the transaction in accordance with ISO 8601 GMT | Not an empty value. |
transaction_sum | String / 25 | Transaction Amount | Maximum 45 characters. Not an empty value. |
currency |
String / “GBP”, “EUR”, “RUB” |
All currencies are specified as strings according to ISO 4217 | Maximum 3 characters. Not an empty value. |
arrival_country | String / “GBR” | All countries are specified as strings according to ISO 3166-1 alpha-3 | Maximum 3 characters. |
arrival_city | String / “London” | Arrival city | Maximum 255 characters. |
arrival_address_line | String / “Peckham Road” | Arrival address line | Maximum 255 characters. |
transaction_status |
String / “Success”, “Charge back”, “refund”, “Movement own goods” |
Transaction Status | Not an empty value. |
good_code | String / “62160000” | code of a good according to EU’s eight-digit coding system The Combined Nomenclature (CN) | Maximum 8 characters. |
vat_percent | Float / 20.00 | vat percent | Maximum 8 characters. |
vat | Float / 28.73 | VAT Amount | Float |
departure_country | String / “AUS” | Payment option by country. All countries are specified as strings according to ISO 3166-1 alpha-3 | Maximum 3 characters. Not an empty value. |
taxable_jurisdiction | String / “GBR” | Payment option by country. All countries are specified as strings according to ISO 3166-1 alpha-3 | Maximum 3 characters. |
buyer_vat_number | String / “UK123123123” | Buyer vat number EU | Maximum 255 characters. |
Exemple de requête pour les marchandises :
Exemple de demande à partir de la console
curl-v POST https://merchant.vatcompliance.co/api/1/send/5aae918d97964ff88df64b059c2cc0f8?if_digital=false&if_vat_calculate=false --header "Content-Type: application/json" -d '{ "transaction_id ": " ttt4565-85546", "transaction_datetime": "2017-01-09T08:27:22 +00:00", "transaction_sum ": 158.04, "currency": "GBP", "arrival_country" : " GBR", "arrival_city" : " London", "arrival_address_line" : " Peckham Road", "transaction_status" : "Success", "good_code": "62160000", "vat_percent": 20.00, "vat": 28.73, "departure_country" : "AUS", }'
Liste des codes de service
contenu audio/visuel | 1 |
diffusion en direct | 2 |
services téléphoniques | 3 |
services téléphoniques par internet | 4 |
services de gestion des appels | 5 |
services de radiomessagerie | 6 |
accès à l’internet | 7 |
images | 8 |
musique | 9 |
jeux | 10 |
Journaux électroniques | 11 |
hébergement web | 12 |
le maintien à distance des programmes | 13 |
espace publicitaire sur un site web | 14 |
livres électroniques | 15 |
licences | 16 |
rencontres | 17 |
l’enseignement à distance | 18 |
jeux de hasard | 19 |
la fourniture de biens | 20 |
autre numérique | 21 |