Futtermittel-API
Anleitung zur technischen Integration mit den LOVAT-Systemen
Begriffe und Abkürzungen
API – Anwendungsprogrammierschnittstelle. Eine Reihe von Aufrufen, die vom System für die Integration mit externen Softwareprodukten bereitgestellt werden.
Händler – der Eigentümer eines Online-Shops.
Kunde – eine Person, die für Waren oder Dienstleistungen bezahlt.
Transaktion – Überweisung von Geldmitteln für Waren oder Dienstleistungen, die der Kunde vom Händler erhalten hat.
Token – eine geheime Zeichenfolge, die vom System zur Identifizierung des Händlers und der Website, über die die Transaktion registriert wird, verwendet wird.
API-Beschreibung
Methode senden.
Beschreibung der Methode.
Die SEND-Methode implementiert den Empfang von Daten über die Transaktion unter Berücksichtigung der Verarbeitung und Berechnung der Mehrwertsteuer und der Systemgebühren.
Referrer URL
Die Methode ist unter der folgenden URL verfügbar:
https://merchant.vatcompliance.co/api/1/ send/{access_token}?if_digital={true/false}&if_vat_calculate={true/false}
Kaufoptionen
Die Aufrufparameter werden in zwei Arten unterteilt:
- Pfadparameter (Token)
Abfrageparameter (Transaktionsdaten)
Das Token wird im internen Konto des Händlers in der ersten Phase des Hinzufügens der Website generiert. Sie erhalten ihn von Ihrem Manager oder finden ihn in der Sektion Store-Einstellungen.
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
Digitale Dienste
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. |
Server-Antwort-Code
Die Antwort auf die Abfrage verwendet den grundlegenden HTTP-Code
Code | Explanation | Response Content |
200 OK | Request Processed | |
400 BadRequest | Invalid request | { error : “Problem with data” } |
401 Unauthorized | Unauthorized access | { error : “Token is invalid.” } |
Beispielabfrage für digitale Dienste:
Beispielabfrage aus der Konsole
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 ** * **", }'
Waren
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. |
Beispielabfrage für Waren:
Beispielabfrage aus der Konsole
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", }'
Service Code Liste
audiovisuelle Inhalte | 1 |
Livestreaming | 2 |
Telefondienste | 3 |
Internet-Telefondienste | 4 |
Anrufmanagementdienste | 5 |
Funkrufdienste | 6 |
Internetzugang | 7 |
Bilder | 8 |
Musik | 9 |
Spiele | 10 |
eZeitungen | 11 |
Webhosting | 12 |
Fernwartung von Programmen | 13 |
Werbefläche auf einer Website | 14 |
E-Bücher | 15 |
Lizenzen | 16 |
Partnersuche | 17 |
Fernunterricht | 18 |
Glücksspiel | 19 |
Lieferung von Waren | 20 |
andere digitale | 21 |