Response for invoice generation

Response for invoice generation
Response for invoice generation description
  • Response provides information about created invoice, its reference and status of the invoice.
Response field description:
Field Description
type
Response type ("InvoiceDto" or "invoice_template”)
"InvoiceDto" - type of invoice data;
"invoice_template” - type of recurring payment data
invoice_ref Invoice reference used in all further API requests
amount Payment amount
currency Payment currency (ISO code (USD, EUR, ...))
created_date Invoice registration date
updated_date Invoice status update date
due_date Invoice due date
shop_code Shop identifier
invoice_status
Current status of invoice:
PREPARED – invoice is ready to be paid;
IN_PROGRESS – payment of the invoice is in progress
SUCCEEDED – payment of invoice is done
FAILED – error in payment processing
WAITING_FOR_APPROVAL – invoice is awaiting approval of merchant (in case of 2nd DMS step)
CANCELLED – invoice is cancelled on 2nd DMS step
payment_id Identifier of payment. Available only for successfully paid invoice
target_payment_id Additional identifier of payment
order_id Unique order ID/bill number in the merchant system from the request
error_code System error code. Descriptions of error codes are available in the section Error codes
error_message Error description
customer Customer information (same as described in Request for invoice generation)
products List of products relevant to payment (same as described in Request for invoice generation)
payment_method Payment method.
merchant_name_a Allowed prefix for dynamic merchant name generation
merchant_name_b Allowed suffix for dynamic merchant name generation
details Additional payment details. Map<String, Object> Specified for separate merchants by special request. Transmitted as key-value pairs.
Response for invoice generation example
Response object:
{
  "type": "InvoiceDto",
  "invoice_ref": "6V2D6AGTK1dQ93Gsyq55vQDkA",
  "amount": 22,
  "currency": "EUR",
  "created_date": "2017-03-29T15:51:20.027Z",
  "updated_date": "2017-03-29T15:51:20.045Z",
  "due_date": null,
  "shop_code": "TEST",
  "invoice_status": "PREPARED",
  "payment_id": null,
  "target_payment_id": null,
  "order_id": "order-1118",
  "error_code": null,
  "error_message": null,
  "payment_method": "FD_SMS",
  "merchant_name_a": "",
  "merchant_name_b": "",
  "customer": {
    "additional_data": "Some other data",
    "address": "test street, 1b - 125",
    "email": "test@test.com",
    "first_name": "John",
    "last_name": "Doe",
    "personal_code": "12345",
    "phone": "+123456789",
    "site_id": null,
    "country": "LV",
    "user_time": null,
    "user_timezone": null,
    "zip": "123456",
    "city": "Riga",
    "ip": null,
    "referer": null,
    "country_by_ip": null,
    "mcc": null,
    "additional_params": {
	      "cookie_info_id": "coockie-476876876",
	      "user_id": "user-123"
      }
  },
  "products": [
    {
      "amount": 2,
      "discount": 0,
      "discount_percent": 0,
      "name": "Product 1",
      "unit": "Unit 1",
      "vat": 0.64,
      "vat_percent": 10

    }, {
      "amount": 2,
      "discount": 0,
      "discount_percent": 0,
      "name": "Product 2",
      "unit": "Unit 2",
      "vat": 0.64,
      "vat_percent": 10
 }, {
      "amount": 4.44,
      "discount": 0,
      "discount_percent": 0,
      "name": "Product 3",
      "unit": "Unit 3",
      "vat": 0.64,
      "vat_percent": 10
    }
  ],
    "details": {}
}