{"openapi":"3.1.0","info":{"title":"Viper Pay API","version":"2026-11-01","description":"Invoices, receipts, payments and standing orders for Israeli businesses. Amounts are integer agorot; dates are Israel time. A partner key (vp_pk_) acts for one of the partner's businesses with the Viper-Business or Viper-Business-External-Id header. Test mode: a test key (vp_sk_test_ / vp_pk_test_) reaches only sandbox businesses, whose documents have no legal effect (SHAAM mock, test signature, acquirers in test mode); a live key never reaches them. Business scopes: customers:read, customers:write, documents:read, documents:write, payments:read, payments:write, subscriptions:read, subscriptions:write, checkout:read, checkout:write, webhooks:read, webhooks:write, business:read, business:write, shaam:read, shaam:write, reports:read, reports:write. Partner scopes: partner:read, businesses:read, businesses:write, act_as, keys:write, webhooks:read, webhooks:write, usage:read, act_as:<business scope>."},"servers":[{"url":"https://app.viper-pay.co.il/api/v1"}],"tags":[{"name":"Business"},{"name":"Customers"},{"name":"Documents"},{"name":"Catalog"},{"name":"Payments"},{"name":"Subscriptions"},{"name":"Webhooks"},{"name":"Israel Invoice"},{"name":"Reports"},{"name":"Partner"},{"name":"Partner webhooks"},{"name":"Meta"}],"components":{"securitySchemes":{"businessKey":{"type":"http","scheme":"bearer","description":"vp_sk_... — acts for its own business only"},"partnerKey":{"type":"http","scheme":"bearer","description":"vp_pk_... — partner endpoints, and business endpoints with Viper-Business"}},"parameters":{"ViperBusiness":{"name":"Viper-Business","in":"header","required":false,"schema":{"type":"string"},"description":"Partner keys: the id of the partner's business to act for."},"ViperBusinessExternalId":{"name":"Viper-Business-External-Id","in":"header","required":false,"schema":{"type":"string"},"description":"Partner keys: the partner's own id of the business (instead of Viper-Business)."},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retry-safe: the same key and body return the first answer (24 hours); a different body answers 422."}},"schemas":{"Object":{"type":"object","additionalProperties":true},"Deleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean"},"archived":{"type":"boolean"}}},"Pdf":{"type":"string","format":"binary"},"Error":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message","request_id"],"properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","conflict_error","rate_limit_error","card_error","tax_authority_error","api_error"]},"code":{"type":"string","enum":["unauthorized","key_expired","forbidden_scope","account_suspended","partner_suspended","partner_capability_disabled","partner_key_required","business_required","business_header_not_allowed","business_not_found","business_disabled","not_found","invalid_request","invalid_json","idempotency_key_reused","idempotency_in_progress","idempotency_key_invalid","rate_limited","plan_feature_unavailable","plan_quota_exceeded","allocation_refused","allocation_unavailable","signature_pending","read_only","conflict","tax_id_exists","tax_id_locked","max_businesses_reached","customer_has_active_subscription","customer_archived","numbering_locked","url_not_allowed","allocations_pending","software_not_registered","report_not_ready","report_failed","transmission_refused","transmission_in_progress","shaam_not_connected","accounts_missing","livemode_mismatch","test_mode_only","live_mode_only","sandbox_not_allowed","card_declined","card_save_pending","refunded_no_document","checkout_blocked","payment_failed","payment_processing","idempotency_key_required","payment_method_in_use","signature_held","internal_error","refusal_superseded","payments_not_configured","payment_provider_unsupported","payment_method_provider_mismatch","payment_method_account_mismatch","payment_method_connection_inactive","card_not_saved","invalid_card","hosted_required","hosted_unsupported","hosted_page_failed","intent_not_open","document_in_progress","test_mode_no_document","seller_particulars_missing","confirm_live_required","connection_test_failed","connection_test_throttled","connection_in_use","test_account_in_live_mode","refund_exceeds_remaining","refund_exceeds_charge","refund_unsupported","refund_provider_mismatch","refund_not_sent","refund_unknown","refund_failed","partial_refund_receipt","checkout_completed","checkout_in_progress","checkout_changed","bot_check_failed","already_paid","not_payable","nothing_due","payment_link_cancelled","link_invalid","link_used","portal_signed_out","email_quota","forbidden","disabled","email_taken","mail_unavailable","reauth_required","reauth_failed","reauth_unavailable","reset_invalid","invitation_invalid","invitation_email","unverified","sign_in_required","wrong_account"]},"message":{"type":"string","description":"English"},"message_he":{"type":"string","description":"The Hebrew message shown in the dashboard, when there is one"},"param":{"type":"string"},"request_id":{"type":"string"},"doc_url":{"type":"string"}}}}},"Customer":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer"},"external_id":{"type":["string","null"]},"name":{"type":"string"},"tax_id":{"type":["string","null"]},"contact_name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"address":{"type":["string","null"]},"city":{"type":["string","null"]},"zip":{"type":["string","null"]},"notes":{"type":["string","null"]},"email_consent":{"type":"boolean"},"email_consent_at":{"type":["string","null"]},"email_consent_source":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"archived":{"type":"boolean"},"archived_at":{"type":["string","null"]},"created_at":{"type":"string"},"kind":{"type":["string","null"],"enum":["business","private","foreign","government","nonprofit",null]},"country_code":{"type":"string"},"deducts_vat":{"type":["boolean","null"]}}},"DocumentSummary":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"integer"},"type_name":{"type":"string"},"number":{"type":"integer"},"issue_date":{"type":"string","format":"date"},"customer_id":{"type":"string"},"currency":{"type":"string"},"subtotal":{"type":"integer"},"vat_amount":{"type":"integer"},"total":{"type":"integer"},"allocation_status":{"type":"string"},"allocation_number":{"type":["string","null"]},"cancelled":{"type":"boolean"},"related_document_id":{"type":["string","null"]},"url":{"type":"string","description":"The customer's link, on the partner's domain when white-labelled"},"pdf_url":{"type":"string"},"original_delivered":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"integer"},"total":{"type":"integer"}}}}}},"Signature":{"type":"object","properties":{"status":{"type":"string","enum":["signed","pending","failed"]},"variant":{"type":["string","null"]},"profile":{"type":["string","null"]},"signed_at":{"type":["string","null"]},"signer":{"type":["string","null"],"enum":["business","platform",null]},"assurance":{"type":["string","null"],"enum":["secure","certified",null]},"signed_on_behalf_tax_id":{"type":["string","null"]},"reason_code":{"type":["string","null"]},"reason":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"]}}},"Balance":{"type":"object","description":"Recomputed from the document links (never stored). Amounts in the document's currency.","properties":{"status":{"type":"string","enum":["open","partial","paid","cancelled","converted","expired","closed"]},"currency":{"type":"string"},"total":{"type":"integer"},"paid":{"type":"integer"},"credited":{"type":"integer"},"refunded":{"type":"integer"},"open":{"type":"integer","description":"What the customer still owes (negative: paid more than the invoice now asks)"},"credit":{"type":"integer"},"unapplied":{"type":"integer","description":"Receipts: the part not applied to an invoice"}}},"Document":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"document"},"business_id":{"type":"string"},"type":{"type":"integer"},"type_name":{"type":"string"},"number":{"type":"integer"},"issue_date":{"type":"string","format":"date"},"due_date":{"type":["string","null"]},"customer_id":{"type":"string"},"seller":{"type":"object","description":"The seller as printed. test: true on a sandbox business's document (test mode: printed as a test, never a legal document)."},"buyer":{"type":"object"},"currency":{"type":"string"},"subtotal":{"type":"integer"},"discount":{"type":"integer"},"vat_rate":{"type":"number"},"vat_amount":{"type":"integer"},"total":{"type":"integer"},"allocation_status":{"type":"string","enum":["not_required","approved","pending","refused"]},"allocation_number":{"type":["string","null"]},"allocation_error":{"type":["string","null"]},"cancelled":{"type":"boolean"},"cancelled_at":{"type":["string","null"]},"cancelled_by_document_id":{"type":["string","null"]},"cancel_reason":{"type":["string","null"]},"related_document_id":{"type":["string","null"]},"related_documents":{"type":"array","items":{"type":"object"}},"source":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"integer"},"total":{"type":"integer"}}}},"payments":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"amount":{"type":"integer"},"paid_on":{"type":"string","format":"date"},"details":{"type":"object"}}}},"url":{"type":"string","description":"The customer's link. Its first opening produces the single original."},"pdf_url":{"type":"string","description":"The customer's PDF link (same rule as url)."},"api_pdf_url":{"type":"string","description":"GET with your key: a copy, never the original unless variant=original."},"original_delivered":{"type":"boolean"},"signature_status":{"type":"string","enum":["signed","pending","failed"]},"created_at":{"type":"string"},"document_title":{"type":"string"},"title_variant":{"type":["string","null"]},"language":{"type":"string","enum":["he","en","he_en"]},"valid_until":{"type":["string","null"]},"period":{"type":["object","null"],"properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"}}},"prices_include_vat":{"type":"boolean"},"discount_percent":{"type":["number","null"]},"printed_discount":{"type":"integer"},"vat_breakdown":{"type":"object","properties":{"taxable":{"type":"integer"},"zero_rated":{"type":"integer"},"exempt":{"type":"integer"},"untaxed":{"type":"integer"}}},"withholding_tax":{"type":"integer"},"fx":{"type":["object","null"],"properties":{"currency":{"type":"string"},"exchange_rate":{"type":"string"},"exchange_rate_date":{"type":"string","format":"date"},"exchange_rate_source":{"type":"string","enum":["boi","manual"]},"subtotal":{"type":"integer"},"discount":{"type":"integer"},"vat_amount":{"type":"integer"},"total":{"type":"integer"}}},"balance":{"$ref":"#/components/schemas/Balance"},"links":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["pays","credits","converts","cancels"]},"direction":{"type":"string","enum":["outgoing","incoming"]},"document_id":{"type":"string"},"type":{"type":["integer","null"]},"number":{"type":["integer","null"]},"amount":{"type":"integer"}}}},"allocation":{"type":"object","properties":{"status":{"type":"string"},"number":{"type":["string","null"]},"error":{"type":["string","null"]},"attempts":{"type":"integer"}}},"signature":{"$ref":"#/components/schemas/Signature"},"content_hash":{"type":"string"},"retain_until":{"type":"string","format":"date"},"livemode":{"type":"boolean"}}},"Cancellation":{"type":"object","properties":{"object":{"const":"document_cancellation"},"original":{"$ref":"#/components/schemas/Document"},"reversal":{"oneOf":[{"$ref":"#/components/schemas/Document"},{"type":"null"}]},"fully_cancelled":{"type":"boolean"},"refund":{"type":["object","null"],"properties":{"transaction_id":{"type":"string"},"amount":{"type":"integer"}}},"email_status":{"type":["string","null"]}}},"Refund":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"refund"},"transaction_id":{"type":"string"},"amount":{"type":"integer"},"status":{"type":"string","enum":["pending","succeeded","failed","unknown"]},"reason":{"type":"string"},"method":{"type":"string","enum":["acquirer","recorded"]},"document_id":{"type":["string","null"]},"error":{"type":["object","null"]},"source":{"type":"string"},"completed_at":{"type":["string","null"]},"created_at":{"type":"string"},"transaction":{"$ref":"#/components/schemas/Transaction"},"document":{"oneOf":[{"$ref":"#/components/schemas/Document"},{"type":"null"}]},"document_error":{"type":["string","null"]}}},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method"},"customer_id":{"type":"string"},"type":{"const":"card"},"card":{"type":"object","properties":{"brand":{"type":["string","null"]},"last4":{"type":"string"},"exp_month":{"type":"integer"},"exp_year":{"type":"integer"},"holder_name":{"type":["string","null"]}}},"provider":{"type":"string"},"connection_id":{"type":["string","null"]},"token_expires_at":{"type":["string","null"]},"consent_at":{"type":["string","null"]},"created_at":{"type":"string"}}},"CardCharge":{"type":"object","properties":{"object":{"const":"charge"},"status":{"type":"string","enum":["succeeded","processing"]},"transaction":{"$ref":"#/components/schemas/Transaction"},"document":{"oneOf":[{"$ref":"#/components/schemas/Document"},{"type":"null"}]},"document_error":{"type":["object","null"]},"email_status":{"type":["string","null"]},"payment_intent_id":{"type":"string","description":"202 processing only"}}},"Product":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product"},"name":{"type":"string"},"sku":{"type":["string","null"]},"unit":{"type":["string","null"]},"unit_price":{"type":"integer"},"currency":{"type":"string"},"prices_include_vat":{"type":"boolean"},"vat_category":{"type":"string"},"archived":{"type":"boolean"},"archived_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"Coupon":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon"},"code":{"type":"string"},"name":{"type":["string","null"]},"percent_off":{"type":["number","null"]},"amount_off":{"type":["integer","null"]},"duration":{"type":"string","enum":["once","repeating","forever"]},"duration_cycles":{"type":["integer","null"]},"max_redemptions":{"type":["integer","null"]},"redeemed":{"type":"integer"},"expires_on":{"type":["string","null"]},"active":{"type":"boolean"},"created_at":{"type":"string"}}},"CustomerStatement":{"type":"object","properties":{"object":{"const":"customer_statement"},"customer_id":{"type":"string"},"owed":{"type":"object","additionalProperties":{"type":"integer"},"description":"Per currency"},"on_account":{"type":"object","additionalProperties":{"type":"integer"}},"balance":{"type":"object","additionalProperties":{"type":"integer"},"description":"owed minus on_account; positive: the customer owes"},"data":{"type":"array","items":{"type":"object","properties":{"document_id":{"type":"string"},"type":{"type":"integer"},"type_name":{"type":"string"},"document_title":{"type":"string"},"number":{"type":"integer"},"issue_date":{"type":"string","format":"date"},"due_date":{"type":["string","null"]},"currency":{"type":"string"},"total":{"type":"integer"},"status":{"type":"string"},"paid":{"type":"integer"},"credited":{"type":"integer"},"refunded":{"type":"integer"},"open":{"type":"integer"},"credit":{"type":"integer"},"unapplied":{"type":"integer"},"cancelled":{"type":"boolean"}}}},"has_more":{"type":"boolean"}}},"PortalSession":{"type":"object","properties":{"object":{"const":"portal_session"},"customer_id":{"type":"string"},"url":{"type":"string"},"sent_to":{"type":["string","null"]}}},"Sandbox":{"type":"object","properties":{"object":{"const":"sandbox"},"created":{"type":"boolean"},"business":{"$ref":"#/components/schemas/Business"},"api_key":{"type":["object","null"],"properties":{"id":{"type":"string"},"key":{"type":"string","description":"vp_sk_test_..., shown once"},"scopes":{"type":"array","items":{"type":"string"}}}},"external_id_held_by":{"type":["string","null"],"description":"The partner's own test business that already holds the live business's external_id (opened with a vp_pk_test_ key): the twin then has no external_id; address it by its id."}}},"PartnerApiKey":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"partner_api_key"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"livemode":{"type":"boolean"},"key":{"type":"string","description":"Shown once, on creation"}}},"Redirect":{"type":"string","description":"303 See Other; Location: success_url or cancel_url with checkout_session_id and status"},"Transaction":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"transaction"},"status":{"type":"string"},"amount":{"type":"integer"},"currency":{"type":"string"},"description":{"type":"string"},"customer_id":{"type":["string","null"]},"document_id":{"type":["string","null"]},"card":{"type":["object","null"]},"error":{"type":["object","null"]},"source":{"type":"string"},"created_at":{"type":"string"},"livemode":{"type":"boolean"},"refunded_amount":{"type":"integer"},"refunded_at":{"type":["string","null"]},"method":{"type":"string"},"installments":{"type":["integer","null"]},"credit_type":{"type":["string","null"]},"failure_kind":{"type":["string","null"]},"acquirer":{"type":["string","null"]},"payment_intent_id":{"type":["string","null"]},"payment_method_id":{"type":["string","null"]}}},"CheckoutSession":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"checkout_session"},"url":{"type":"string"},"mode":{"type":"string"},"amount":{"type":["integer","null"]},"status":{"type":"string"},"transaction_id":{"type":["string","null"]},"subscription_id":{"type":["string","null"]},"metadata":{"type":"object"},"expires_at":{"type":["string","null"]},"created_at":{"type":"string"},"purpose":{"type":"string","enum":["sale","donation","invoice"]},"document_id":{"type":["string","null"]},"failure_url":{"type":["string","null"]},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"product_id":{"type":["string","null"]},"description":{"type":"string"},"unit_amount":{"type":"integer"},"quantity":{"type":"integer"},"quantity_editable":{"type":"boolean"},"min_quantity":{"type":["integer","null"]},"max_quantity":{"type":["integer","null"]}}}},"custom_fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean"},"options":{"type":["array","null"],"items":{"type":"string"}}}}},"min_amount":{"type":["integer","null"]},"max_amount":{"type":["integer","null"]},"suggested_amounts":{"type":"array","items":{"type":"integer"}},"max_uses":{"type":["integer","null"]},"use_count":{"type":"integer"},"require_terms":{"type":"boolean"},"collect":{"type":"object"},"allow_recurring":{"type":"boolean"},"methods":{"type":["array","null"],"items":{"type":"string"}},"customer_id":{"type":["string","null"]},"payment_method_id":{"type":["string","null"]},"payment_method":{"oneOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"type":"null"}]},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"livemode":{"type":"boolean"}}},"PaymentLink":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_link"},"kind":{"type":"string","enum":["invoice","amount"]},"status":{"type":"string","enum":["open","paid","cancelled","expired"]},"customer_id":{"type":"string"},"document_id":{"type":["string","null"]},"checkout_session_id":{"type":["string","null"]},"amount":{"type":["integer","null"]},"amount_due":{"type":["integer","null"],"description":"What the customer pays now (an invoice's open balance)"},"currency":{"const":"ILS"},"description":{"type":"string"},"url":{"type":"string","description":"On the business's public origin (a partner's domain when white-labelled)"},"share":{"type":["object","null"],"properties":{"whatsapp":{"type":"string"},"sms":{"type":"string"},"text":{"type":"string"}}},"deliveries":{"type":"array","items":{"type":"object"}},"last_sent_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"paid_at":{"type":["string","null"]},"metadata":{"type":"object"},"created_at":{"type":"string"}}},"Subscription":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription"},"customer_id":{"type":"string"},"payment_method_id":{"type":["string","null"]},"description":{"type":"string"},"amount":{"type":"integer"},"day_of_month":{"type":"integer"},"status":{"type":"string"},"cycles_billed":{"type":"integer"},"total_cycles":{"type":["integer","null"]},"next_charge_date":{"type":["string","null"]},"start_date":{"type":"string","format":"date"},"cancelled_at":{"type":["string","null"]},"created_at":{"type":"string"},"collection_method":{"type":"string","enum":["card","invoice"]},"interval":{"type":"string","enum":["week","month","year"]},"interval_count":{"type":"integer"},"items":{"type":"array","items":{"type":"object"}},"prices_include_vat":{"type":"boolean"},"cycles_paid":{"type":"integer"},"trial_ends_at":{"type":["string","null"]},"setup_fee":{"type":"integer"},"discount":{"type":["object","null"]},"invoice_document_type":{"type":["integer","null"]},"paused_at":{"type":["string","null"]},"cancel_reason":{"type":["string","null"]},"cancelled_by":{"type":["string","null"]},"metadata":{"type":"object"},"mandate":{"type":["object","null"],"description":"GET /subscriptions/{id} and POST /subscriptions: channel, accepted_at, terms_text, terms_hash"}}},"Charge":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription_charge"},"subscription_id":{"type":"string"},"cycle_number":{"type":"integer"},"due_date":{"type":"string","format":"date"},"amount":{"type":"integer"},"status":{"type":"string","enum":["pending","processing","paid","retrying","failed","needs_review","awaiting_payment","cancelled"]},"attempts":{"type":"integer"},"transaction_id":{"type":["string","null"]},"document_id":{"type":["string","null"]},"collection_method":{"type":"string"},"period_start":{"type":["string","null"]},"period_end":{"type":["string","null"]},"decline_class":{"type":["string","null"],"enum":["soft","hard","funds",null]},"resolution":{"type":["string","null"]},"livemode":{"type":["boolean","null"]}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"webhook_endpoint"},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"type":["string","null"]},"consecutive_failures":{"type":"integer"},"last_success_at":{"type":["string","null"]},"previous_secret_expires_at":{"type":["string","null"]},"created_at":{"type":"string"}}},"WebhookEndpointWithSecret":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","properties":{"secret":{"type":"string","description":"Shown once"}}}]},"Event":{"type":"object","description":"The envelope every webhook delivery carries.","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"type":"string","enum":["payment.succeeded","payment.failed","payment.refunded","payment.pending","payment.needs_review","payment.refund_failed","document.issued","document.cancelled","document.paid","document.signed","document.signing_failed","document.updated","document.allocation_updated","document.allocation_refused","shaam.connected","shaam.expiring","shaam.reconnect_required","customer.created","customer.updated","customer.archived","customer.restored","subscription.created","subscription.updated","subscription.paused","subscription.resumed","subscription.cancelled","subscription.completed","subscription.charge_succeeded","subscription.charge_failed","subscription.past_due","subscription.charge_needs_review","subscription.charge_dismissed","subscription.charge_invoiced","subscription.trial_will_end","subscription.charge_document_issued","checkout.completed","report.ready","report.failed","report.transmission_updated","payment_request.created","payment_request.paid","document.reminder_sent","payment_method.created","payment_method.deleted","business.created","business.updated","business.disabled","business.reactivated","business.owner_joined","ping"]},"api_version":{"const":"2026-11-01"},"created":{"type":"string"},"business_id":{"type":["string","null"]},"business_external_id":{"type":["string","null"]},"partner_id":{"type":["string","null"]},"data":{"type":"object"},"livemode":{"type":"boolean","description":"false for the events of a sandbox business"}}},"Delivery":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"endpoint_id":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer"},"next_attempt_at":{"type":["string","null"]},"response_code":{"type":["integer","null"]},"response_snippet":{"type":["string","null"]},"error":{"type":["string","null"]}}},"Business":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"business"},"external_id":{"type":["string","null"]},"partner_id":{"type":["string","null"]},"name":{"type":"string"},"business_type":{"type":"string"},"tax_id":{"type":"string"},"address":{"type":"object"},"contact":{"type":"object"},"branding":{"type":"object"},"email":{"type":"object"},"status":{"type":"string","enum":["active","disabled","suspended"]},"readiness":{"type":"object","properties":{"shaam":{"type":"object","properties":{"status":{"type":"string","enum":["mock","disconnected","connected","expiring","reconnect"]}}},"signing":{"type":"object","properties":{"status":{"type":"string","enum":["active","test_auto","none"]}}},"payments":{"type":"object","properties":{"status":{"type":"string","enum":["connected","test_mode","not_connected"]}}},"documents_this_month":{"type":"integer"},"can_request_allocations":{"type":"boolean"},"can_deliver_documents":{"type":"boolean"},"can_take_payments":{"type":"boolean"}}},"plan":{"type":["object","null"]},"created_at":{"type":"string"},"livemode":{"type":"boolean","description":"false: a sandbox business (test keys only, no legal effect)"},"sandbox_of":{"type":["string","null"]}}},"Partner":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"partner"},"name":{"type":"string"},"status":{"type":"string"},"capabilities":{"type":"object"},"billing_mode":{"type":"string"},"public_base_url":{"type":["string","null"]}}},"Invitation":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"invitation"},"kind":{"type":"string"},"business_id":{"type":["string","null"]},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"expires_at":{"type":"string"},"url":{"type":"string","description":"Only when send_email was false"}}},"ApiKeyWithSecret":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"api_key"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"key":{"type":"string","description":"Shown once"}}},"Usage":{"type":"object","properties":{"object":{"const":"usage"},"month":{"type":"string"},"totals":{"type":"object"},"data":{"type":"array","items":{"type":"object"}}}},"CustomerList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"DocumentList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"TransactionList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"CheckoutSessionList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSession"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"PaymentLinkList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLink"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"SubscriptionList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"ChargeList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Charge"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"WebhookEndpointList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"EventList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"DeliveryList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"BusinessList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Business"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"RefundList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"PaymentMethodList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"ProductList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"CouponList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Coupon"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"PartnerApiKeyList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PartnerApiKey"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"ReportRunEvent":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"from":{"type":["string","null"]},"to":{"type":["string","null"]},"period":{"type":["string","null"]},"file_sha256":{"type":["string","null"]},"error":{"type":["string","null"]},"download_url":{"type":["string","null"]}}},"ReportRun":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"report_run"},"kind":{"type":"string","enum":["openfrmt","pcn874","accountant","hashavshevet"]},"status":{"type":"string","enum":["pending","running","ready","failed"]},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"period":{"type":["string","null"],"description":"PCN874: the month that ends the period, YYYYMM"},"folder":{"type":["string","null"],"description":"OPENFRMT: OPENFRMT/<8 digits>.<YY>/<MMDDhhmm>"},"primary_id":{"type":["string","null"],"description":"OPENFRMT: the file's 15-digit primary identifier"},"counts":{"type":"object","additionalProperties":{"type":"integer"}},"summary":{"type":"object"},"software":{"type":["object","null"],"description":"The software identity written into A000 (registration number, name, version, vendor); test: true marks a test file"},"document_count":{"type":"integer"},"file_name":{"type":["string","null"]},"content_type":{"type":["string","null"]},"file_sha256":{"type":["string","null"]},"file_size":{"type":["integer","null"]},"error":{"type":["string","null"]},"created_via":{"type":"string","enum":["app","api"]},"started_at":{"type":"string"},"finished_at":{"type":["string","null"]},"created_at":{"type":"string"},"download_url":{"type":["string","null"]}}},"ReportTransmission":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"report_transmission"},"report_run_id":{"type":"string"},"status":{"type":"string","enum":["pending","uploading","uploaded","approved","rejected","not_required","failed"]},"environment":{"type":"string","enum":["mock","sandbox","production"],"description":"mock: nothing was sent to the Tax Authority"},"case_number":{"type":"string"},"representor_company_id":{"type":["string","null"]},"unique_id":{"type":["string","null"],"description":"The Tax Authority's id of the set of files"},"files":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["ini","bkm"]},"file_name":{"type":"string"},"file_unique_id":{"type":"string"},"size":{"type":"integer"},"sha256":{"type":"string"},"status":{"type":["string","null"],"description":"As the Tax Authority reports it: Uploaded, Approved, Rejected"},"description":{"type":["string","null"]},"uploaded_at":{"type":["string","null"]},"checked_at":{"type":["string","null"]},"placeholder":{"type":"boolean","description":"Sandbox only: a test PDF was uploaded in place of the file"}}}},"error":{"type":["string","null"]},"error_code":{"type":["string","null"]},"attempts":{"type":"integer"},"created_via":{"type":"string","enum":["app","api","auto"]},"uploaded_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]},"created_at":{"type":"string"}}},"ReportTransmissionList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReportTransmission"}},"has_more":{"type":"boolean"}}},"ReportRunList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReportRun"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"HashavshevetAccountMap":{"type":"object","properties":{"object":{"const":"hashavshevet_account_map"},"accounts":{"type":"object","additionalProperties":{"type":"string"}},"movement_types":{"type":"object","properties":{"invoice":{"type":"string"},"credit":{"type":"string"},"receipt":{"type":"string"}}},"customer_accounts":{"type":"object","additionalProperties":{"type":"string"},"description":"By customer key"},"updated_at":{"type":["string","null"]}}},"ReportFile":{"type":"string","format":"binary","description":"application/zip, text/plain (PCN874) or XLSX; Viper-File-Sha256 carries the hash"},"DocumentTypeReport":{"type":"object","properties":{"object":{"const":"document_type_report"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"integer"},"name":{"type":"string"},"managed":{"type":"boolean"},"count":{"type":"integer"},"total":{"type":"integer"},"cancelled":{"type":"integer"}}}},"quotes":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"}}}}},"VatSummary":{"type":"object","properties":{"object":{"const":"vat_summary"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"data":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"invoices":{"type":"integer"},"credits":{"type":"integer"},"taxable_net":{"type":"integer"},"zero_rated_net":{"type":"integer"},"exempt_net":{"type":"integer"},"untaxed_net":{"type":"integer"},"vat":{"type":"integer"},"credit_net":{"type":"integer"},"credit_vat":{"type":"integer"},"net":{"type":"integer"},"received":{"type":"integer"},"withholding_tax":{"type":"integer"},"pending_allocations":{"type":"integer"}}}}}}}},"paths":{"/business":{"get":{"operationId":"getBusiness","summary":"The business this request acts for, with its readiness","tags":["Business"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/business/sandbox":{"post":{"operationId":"postBusinessSandbox","summary":"Open (once) the sandbox twin of this live business and get a test key (vp_sk_test_) for it","description":"The twin copies the business's details and team. Everything it does is a test: allocation numbers from the SHAAM stand-in (TEST-...), the test signing authority, acquirers in test mode only; its documents are printed as tests (title, banner, watermark) and its email reaches only the business's own people. 201 when opened now, 200 when it existed. A partner key gets the twin without a key (it uses a vp_pk_test_ key).","tags":["Business"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"business:write","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers":{"get":{"operationId":"getCustomers","summary":"List customers","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"email","in":"query","required":false,"schema":{"type":"string"}},{"name":"tax_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"external_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postCustomers","summary":"Create a customer","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"external_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"tax_id":{"type":"string","maxLength":20},"contact_name":{"type":"string","maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"phone":{"type":"string","maxLength":40},"address":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"zip":{"type":"string","maxLength":20},"notes":{"type":"string","maxLength":2000},"email_consent":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"kind":{"anyOf":[{"type":"string","enum":["business","private","foreign","government","nonprofit"]},{"type":"null"}]},"country_code":{"type":"string","pattern":"^[A-Za-z]{2}$"},"deducts_vat":{"type":["boolean","null"]}},"required":["name"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}":{"get":{"operationId":"getCustomersById","summary":"Get a customer","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchCustomersById","summary":"Update a customer (email_consent false withdraws consent, audited)","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"external_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"tax_id":{"type":"string","maxLength":20},"contact_name":{"type":"string","maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"phone":{"type":"string","maxLength":40},"address":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"zip":{"type":"string","maxLength":20},"notes":{"type":"string","maxLength":2000},"email_consent":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"kind":{"anyOf":[{"type":"string","enum":["business","private","foreign","government","nonprofit"]},{"type":"null"}]},"country_code":{"type":"string","pattern":"^[A-Za-z]{2}$"},"deducts_vat":{"type":["boolean","null"]}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteCustomersById","summary":"Delete, or archive when documents or charges refer to it","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}/restore":{"post":{"operationId":"postCustomersByIdRestore","summary":"Restore an archived customer","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/external/{external_id}":{"get":{"operationId":"getCustomersExternalByExternalId","summary":"Get a customer by your id","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putCustomersExternalByExternalId","summary":"Create or update a customer by your id (201 created, 200 updated)","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"tax_id":{"type":"string","maxLength":20},"contact_name":{"type":"string","maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"phone":{"type":"string","maxLength":40},"address":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"zip":{"type":"string","maxLength":20},"notes":{"type":"string","maxLength":2000},"email_consent":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"kind":{"anyOf":[{"type":"string","enum":["business","private","foreign","government","nonprofit"]},{"type":"null"}]},"country_code":{"type":"string","pattern":"^[A-Za-z]{2}$"},"deducts_vat":{"type":["boolean","null"]}},"required":["name"]}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}/statement":{"get":{"operationId":"getCustomersByIdStatement","summary":"The customer's statement (כרטסת): documents with balances, owed and on account per currency","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"customers:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":500}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerStatement"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}/portal-sessions":{"post":{"operationId":"postCustomersByIdPortalSessions","summary":"A single-use sign-in link to the customer's personal area (emailed unless send_email is false). Also requires documents:read and subscriptions:write","tags":["Customers"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"customers:write","x-viperpay-module":"pages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"send_email":{"type":"boolean","default":true}}}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSession"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}/payment-methods":{"get":{"operationId":"getCustomersByIdPaymentMethods","summary":"The customer's saved cards (tokens; never the card number)","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"payments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{id}/payment-methods/{payment_method_id}":{"get":{"operationId":"getCustomersByIdPaymentMethodsByPaymentMethodId","summary":"A saved card","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"payments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethod"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteCustomersByIdPaymentMethodsByPaymentMethodId","summary":"Remove a saved card (409 payment_method_in_use while a standing order charges it)","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"payments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents":{"get":{"operationId":"getDocuments","summary":"List documents","tags":["Documents"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"type","in":"query","required":false,"schema":{"type":"integer"}},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"issued_from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"issued_to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"allocation_status","in":"query","required":false,"schema":{"type":"string","enum":["not_required","approved","pending","refused"]}},{"name":"cancelled","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["manual","subscription","checkout","api"]}},{"name":"number","in":"query","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postDocuments","summary":"Issue a document (10, 100, 200, 210, 300, 305, 310, 320, 400, 405)","description":"Every field of the documents engine: lines with VAT category, discount, SKU, unit and catalog product; foreign currency at the Bank of Israel rate (or exchange_rate); withholding tax; receipts that pay invoices (applies_to); documents based on others (based_on); proforma, quote validity, periodic period; language he, en or he_en (omitted: the first linked document's, else Hebrew). Requests an allocation number from the Tax Authority when the law requires one (409 allocation_unavailable / allocation_refused unless issue_without_allocation). Send Idempotency-Key: a retry returns the same document instead of issuing the next number. The key is also stored on the document in the issuing transaction, so even a retry past the 24-hour store returns it (200, Idempotent-Replayed: true).","tags":["Documents"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"type":"string"},"customer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"external_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"tax_id":{"type":"string","maxLength":20},"contact_name":{"type":"string","maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"phone":{"type":"string","maxLength":40},"address":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"zip":{"type":"string","maxLength":20},"notes":{"type":"string","maxLength":2000},"email_consent":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"kind":{"anyOf":[{"type":"string","enum":["business","private","foreign","government","nonprofit"]},{"type":"null"}]},"country_code":{"type":"string","pattern":"^[A-Za-z]{2}$"},"deducts_vat":{"type":["boolean","null"]}},"required":["name"]},"type":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":1000000},"unit_price":{"type":"integer","minimum":-10000000000,"maximum":10000000000},"vat_category":{"type":"string","enum":["standard","zero_export","zero_other","exempt","eilat","non_taxable"]},"discount":{"type":"integer","minimum":0,"maximum":10000000000},"discount_percent":{"type":"number","minimum":0,"maximum":100},"sku":{"type":"string","maxLength":40},"unit":{"type":"string","maxLength":20},"product_id":{"type":"string","maxLength":60}}}},"prices_include_vat":{"type":"boolean"},"discount":{"type":"integer","minimum":0,"maximum":10000000000},"discount_percent":{"type":"number","minimum":0,"maximum":100},"due_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"payments":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["cash","check","credit_card","bank_transfer","voucher","standing_order","bit","paybox","paypal","payment_app","other"]},"amount":{"type":"integer","minimum":-10000000000,"maximum":10000000000},"paid_on":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"details":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":100},{"type":"number"}]}}},"required":["method","amount"]}},"withholding_tax":{"type":"integer","minimum":0,"maximum":10000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"exchange_rate":{"anyOf":[{"type":"string","pattern":"^\\d{1,6}(\\.\\d{1,10})?$"},{"type":"number","exclusiveMinimum":0,"maximum":100000}]},"title_variant":{"type":"string","enum":["proforma"]},"valid_until":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"period_start":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"period_end":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"language":{"type":"string","enum":["he","en","he_en"]},"send_email":{"default":false,"type":"boolean"},"issue_without_allocation":{"default":false,"type":"boolean"},"applies_to":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"document_id":{"type":"string","maxLength":60},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":10000000000}},"required":["document_id","amount"]}},"based_on":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":60}},"related_document_id":{"type":"string"}},"required":["type","items"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents/convert":{"post":{"operationId":"postDocumentsConvert","summary":"Issue a document based on existing ones (quote -> invoice, 300 -> 305/320, delivery notes -> 310)","description":"Copies the sources' lines unless items are sent, links the new document to them (they become converted), and takes their customer, currency, price terms and language unless sent. Idempotency-Key as POST /documents.","tags":["Documents"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":60}},"type":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":1000000},"unit_price":{"type":"integer","minimum":-10000000000,"maximum":10000000000},"vat_category":{"type":"string","enum":["standard","zero_export","zero_other","exempt","eilat","non_taxable"]},"discount":{"type":"integer","minimum":0,"maximum":10000000000},"discount_percent":{"type":"number","minimum":0,"maximum":100},"sku":{"type":"string","maxLength":40},"unit":{"type":"string","maxLength":20},"product_id":{"type":"string","maxLength":60}}}},"prices_include_vat":{"type":"boolean"},"discount":{"type":"integer","minimum":0,"maximum":10000000000},"discount_percent":{"type":"number","minimum":0,"maximum":100},"due_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"type":"string","maxLength":2000},"payments":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["cash","check","credit_card","bank_transfer","voucher","standing_order","bit","paybox","paypal","payment_app","other"]},"amount":{"type":"integer","minimum":-10000000000,"maximum":10000000000},"paid_on":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"details":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":100},{"type":"number"}]}}},"required":["method","amount"]}},"withholding_tax":{"type":"integer","minimum":0,"maximum":10000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"exchange_rate":{"anyOf":[{"type":"string","pattern":"^\\d{1,6}(\\.\\d{1,10})?$"},{"type":"number","exclusiveMinimum":0,"maximum":100000}]},"title_variant":{"type":"string","enum":["proforma"]},"valid_until":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"period_start":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"period_end":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"language":{"type":"string","enum":["he","en","he_en"]},"send_email":{"default":false,"type":"boolean"},"issue_without_allocation":{"default":false,"type":"boolean"}},"required":["source_ids","type"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents/{id}":{"get":{"operationId":"getDocumentsById","summary":"Get a document with lines, payments and related documents","tags":["Documents"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents/{id}/pdf":{"get":{"operationId":"getDocumentsByIdPdf","summary":"Download the signed PDF (a copy by default; never uses up the original)","description":"409 signature_pending (with reason_code and Retry-After) while the document is not signed yet; document.signed says when it is.","tags":["Documents"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"variant","in":"query","required":false,"schema":{"type":"string","enum":["copy","original"],"default":"copy"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/pdf":{"schema":{"$ref":"#/components/schemas/Pdf"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents/{id}/cancel":{"post":{"operationId":"postDocumentsByIdCancel","summary":"Cancel: credit invoice (full or partial), cancelling receipt, or mark cancelled","description":"refund_payments records money paid back outside Viper Pay on the reversal; refund_card refunds the card charge behind the document at the acquirer (full cancellation) and also requires payments:write. Idempotency-Key is stored on the reversal too.","tags":["Documents"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":300},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":10000000000},"refund_payments":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["cash","check","credit_card","bank_transfer","voucher","standing_order","bit","paybox","paypal","payment_app","other"]},"paid_on":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"details":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":100},{"type":"number"}]}},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":10000000000}},"required":["method","amount"]}},"refund_card":{"default":false,"type":"boolean"},"send_email":{"default":false,"type":"boolean"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cancellation"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents/{id}/send":{"post":{"operationId":"postDocumentsByIdSend","summary":"Email the document with its signed PDF","tags":["Documents"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transactions":{"get":{"operationId":"getTransactions","summary":"List card transactions","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["succeeded","failed","refunded"]}},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"created_from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"created_to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transactions/{id}":{"get":{"operationId":"getTransactionsById","summary":"Get a transaction","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transactions/{id}/refunds":{"get":{"operationId":"getTransactionsByIdRefunds","summary":"Refunds of a transaction","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postTransactionsByIdRefunds","summary":"Refund a card transaction, in full or in part (requires Idempotency-Key)","description":"Recorded before the acquirer is called, under the transaction's lock, so a retry or a concurrent refund never returns more than was charged. issue_document (default true) issues the credit invoice (full or partial) or cancelling receipt (full only). status: succeeded, failed (nothing returned), unknown (a person checks with the acquirer), pending.","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"payments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"maximum":1000000000000},"reason":{"type":"string","minLength":1,"maxLength":300},"issue_document":{"default":true,"type":"boolean"},"method":{"default":"acquirer","type":"string","enum":["acquirer","recorded"]}},"required":["reason"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/charges":{"post":{"operationId":"postCharges","summary":"Charge a customer's saved card and issue its tax invoice/receipt (requires Idempotency-Key)","description":"201 succeeded with the transaction and the document; 402 card_declined / payment_failed with error.transaction; 202 processing when the outcome is not known yet (never a decline: retry with the same key). The key is the payment intent's own key, so a retry never charges twice.","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"payments:write","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"type":"string","maxLength":60},"payment_method_id":{"type":"string","maxLength":60},"amount":{"type":"integer","minimum":100,"maximum":1000000000},"description":{"type":"string","minLength":1,"maxLength":300},"installments":{"type":"object","properties":{"count":{"type":"integer","minimum":2,"maximum":36},"plan":{"default":"installments","type":"string","enum":["installments","credit"]}},"required":["count"]},"issue_document":{"default":true,"type":"boolean"},"send_email":{"default":false,"type":"boolean"}},"required":["customer_id","payment_method_id","amount","description"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardCharge"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/checkout-sessions":{"get":{"operationId":"getCheckoutSessions","summary":"List checkout sessions","description":"Pages the system opens itself (invoice payment attempts, amount requests: see /payment-links) only with include_system=true.","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","completed","disabled"]}},{"name":"include_system","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postCheckoutSessions","summary":"Create a hosted payment or standing-order sign-up page, or (mode setup) a page that saves a card without charging","description":"pages: also a cart from the catalog (items), questions (custom_fields), a payer-chosen amount within bounds (amount null, min_amount, max_amount, suggested_amounts), required terms, a donation (purpose donation, allow_recurring), wallets and a failure_url. See docs/payment-pages.md. api2: mode \"setup\" (customer_id, success_url, cancel_url) opens the acquirer's own page to save a card: the answer is a session (id pi_...) with its url; the customer returns through /checkout-sessions/{id}/return, which confirms the outcome with the acquirer; payment_method.created follows.","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["payment","subscription"]},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"amount":{"description":"Agorot, VAT included. null: the payer chooses (min_amount / max_amount / suggested_amounts). Omit when items are given.","anyOf":[{"type":"integer","minimum":100,"maximum":100000000},{"type":"null"}]},"customer_id":{"type":"string"},"day_of_month":{"type":"integer","minimum":1,"maximum":31},"total_cycles":{"type":"integer","minimum":1,"maximum":9007199254740991},"success_url":{"type":"string","format":"uri"},"cancel_url":{"type":"string","format":"uri"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expires_in_minutes":{"type":"integer","minimum":5,"maximum":43200},"purpose":{"description":"donation: a donation receipt (405) with a s.46 approval, a receipt (400) without one","type":"string","enum":["sale","donation"]},"items":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"description":{"type":"string","maxLength":200},"unit_amount":{"description":"Agorot, VAT included (taken from the catalog product when omitted)","type":"integer","minimum":100,"maximum":100000000},"quantity":{"type":"integer","minimum":0,"maximum":999},"quantity_editable":{"type":"boolean"},"min_quantity":{"type":"integer","minimum":0,"maximum":999},"max_quantity":{"type":"integer","minimum":1,"maximum":999}}}},"custom_fields":{"maxItems":15,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":40},"label":{"type":"string","minLength":1,"maxLength":80},"type":{"type":"string","enum":["text","textarea","number","email","phone","date","select","checkbox"]},"required":{"type":"boolean"},"options":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}},"on_document":{"type":"boolean"}},"required":["label"]}},"min_amount":{"type":"integer","minimum":100,"maximum":100000000},"max_amount":{"type":"integer","minimum":100,"maximum":100000000},"suggested_amounts":{"maxItems":6,"type":"array","items":{"type":"integer","minimum":100,"maximum":100000000}},"max_installments":{"type":"integer","minimum":1,"maximum":36},"failure_url":{"type":"string","format":"uri"},"terms_text":{"type":"string","maxLength":5000},"require_terms":{"type":"boolean"},"collect":{"type":"object","properties":{"tax_id":{"type":"string","enum":["hidden","optional","required"]},"phone":{"type":"string","enum":["hidden","optional","required"]},"address":{"type":"boolean"}}},"show_vat_breakdown":{"type":"boolean"},"allow_recurring":{"description":"Donation sessions: the donor may choose a monthly donation","type":"boolean"},"methods":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["card","bit","apple_pay","google_pay"]}}},"required":["mode","title"]},{"type":"object","properties":{"mode":{"type":"string","const":"setup"},"customer_id":{"type":"string","maxLength":60},"success_url":{"type":"string","maxLength":1000,"format":"uri"},"cancel_url":{"type":"string","maxLength":1000,"format":"uri"},"expires_in_minutes":{"default":60,"type":"integer","minimum":5,"maximum":1440}},"required":["mode","customer_id","success_url"]}]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/checkout-sessions/{id}":{"get":{"operationId":"getCheckoutSessionsById","summary":"Get a checkout session (a setup session pi_... is confirmed with the acquirer while open)","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/checkout-sessions/{id}/return":{"get":{"operationId":"getCheckoutSessionsByIdReturn","summary":"Where the acquirer sends the customer back after a setup session (public)","description":"Confirms the outcome with the acquirer server to server and redirects (303) to success_url or cancel_url with checkout_session_id and status. Not called by integrators.","tags":["Payments"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"outcome","in":"query","required":false,"schema":{"type":"string","enum":["done","cancel"]}}],"responses":{"303":{"description":"Redirect","headers":{"Location":{"schema":{"type":"string"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payment-links":{"get":{"operationId":"getPaymentLinks","summary":"List payment links (invoice links and amount requests)","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"checkout:read","x-viperpay-module":"pages","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","paid","cancelled","expired"]}},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"document_id","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postPaymentLinks","summary":"Create (and optionally send) a payment link for an issued invoice or an amount","description":"document_id: the link pays the invoice's open balance and a receipt that pays it is issued (a 320 based on a VAT dealer's 300). customer_id + amount: a single-use page booked to the customer. send_via: email and/or sms (SMS is only logged until an SMS provider is configured).","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"checkout:write","x-viperpay-module":"pages","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"document_id":{"description":"An issued invoice (300/305/310, ILS): the link pays its open balance with a receipt","type":"string"},"customer_id":{"description":"With amount: a request for an amount, booked to this customer","type":"string"},"amount":{"type":"integer","minimum":100,"maximum":100000000},"description":{"type":"string","minLength":1,"maxLength":120},"expires_in_days":{"type":"integer","minimum":1,"maximum":365},"send_via":{"description":"Send now: email (to the customer, or `email`) and/or sms (to the customer's mobile, or `phone`)","maxItems":2,"type":"array","items":{"type":"string","enum":["email","sms"]}},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":30},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payment-links/{id}":{"get":{"operationId":"getPaymentLinksById","summary":"Get a payment link with the amount due now","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"checkout:read","x-viperpay-module":"pages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payment-links/{id}/send":{"post":{"operationId":"postPaymentLinksByIdSend","summary":"Send an open payment link by email and/or SMS","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"checkout:write","x-viperpay-module":"pages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"send_via":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["email","sms"]}},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":30}},"required":["send_via"]}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payment-links/{id}/cancel":{"post":{"operationId":"postPaymentLinksByIdCancel","summary":"Cancel an open payment link","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"checkout:write","x-viperpay-module":"pages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payment-provider":{"get":{"operationId":"getPaymentProvider","summary":"Acquirer connections of the business","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"payments","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putPaymentProvider","summary":"Connect an acquirer (one connection test; 10 minutes wait after a failed one)","description":"For a partner acting for its business this is per-sub-business acquirer credentials (P-G4); it needs the partner capability paymentCredentials.","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"payments","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["provider","credentials"],"properties":{"provider":{"type":"string"},"credentials":{"type":"object","additionalProperties":{"type":"string"}},"settings":{"type":"object"},"confirm_live":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePaymentProvider","summary":"Disconnect an acquirer connection","tags":["Payments"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"payments","parameters":[{"name":"connection_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"get":{"operationId":"getProducts","summary":"The product and service catalog","tags":["Catalog"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sku","in":"query","required":false,"schema":{"type":"string"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postProducts","summary":"Add a product or service (lines with its product_id take what they leave out)","tags":["Catalog"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"sku":{"type":"string","maxLength":40},"unit":{"type":"string","maxLength":20},"unit_price":{"type":"integer","minimum":0,"maximum":100000000000},"currency":{"default":"ILS","type":"string","pattern":"^[A-Z]{3}$"},"prices_include_vat":{"default":false,"type":"boolean"},"vat_category":{"default":"standard","type":"string","enum":["standard","zero_export","zero_other","exempt","eilat","non_taxable"]}},"required":["name","unit_price"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/{id}":{"get":{"operationId":"getProductsById","summary":"Get a product","tags":["Catalog"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchProductsById","summary":"Change a product (issued documents keep their copy of the line)","tags":["Catalog"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"sku":{"type":"string","maxLength":40},"unit":{"type":"string","maxLength":20},"unit_price":{"type":"integer","minimum":0,"maximum":100000000000},"currency":{"default":"ILS","type":"string","pattern":"^[A-Z]{3}$"},"prices_include_vat":{"default":false,"type":"boolean"},"vat_category":{"default":"standard","type":"string","enum":["standard","zero_export","zero_other","exempt","eilat","non_taxable"]}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteProductsById","summary":"Archive a product (refused on new lines; issued documents unchanged)","tags":["Catalog"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/sku/{sku}":{"get":{"operationId":"getProductsSkuBySku","summary":"Get the active product with this SKU","tags":["Catalog"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"sku","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putProductsSkuBySku","summary":"Create or update the active product with this SKU (201 / 200): catalog sync","tags":["Catalog"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"sku","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"unit":{"type":"string","maxLength":20},"unit_price":{"type":"integer","minimum":0,"maximum":100000000000},"currency":{"default":"ILS","type":"string","pattern":"^[A-Z]{3}$"},"prices_include_vat":{"default":false,"type":"boolean"},"vat_category":{"default":"standard","type":"string","enum":["standard","zero_export","zero_other","exempt","eilat","non_taxable"]}},"required":["name","unit_price"]}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coupons":{"get":{"operationId":"getCoupons","summary":"Coupons of standing orders","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postCoupons","summary":"Create a coupon (apply it with coupon_code on POST/PATCH /subscriptions)","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":2,"maxLength":40},"name":{"type":"string","maxLength":120},"percent_off":{"type":"number","minimum":0.01,"maximum":100},"amount_off":{"type":"integer","minimum":1,"maximum":100000000},"duration":{"type":"string","enum":["once","repeating","forever"]},"duration_cycles":{"type":"integer","minimum":1,"maximum":120},"max_redemptions":{"type":"integer","minimum":1,"maximum":9007199254740991},"expires_on":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["code","duration"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coupons/{id}":{"get":{"operationId":"getCouponsById","summary":"Get a coupon","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchCouponsById","summary":"Turn a coupon off or on (orders that use it keep their discount)","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"]}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions":{"get":{"operationId":"getSubscriptions","summary":"List standing orders","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","paused","past_due","cancelled","completed"]}},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postSubscriptions","summary":"Start a standing order: on a saved card, or a recurring invoice paid by transfer (lines, interval, trial, setup fee, coupon, mandate)","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"type":"string"},"payment_method_id":{"type":"string"},"description":{"type":"string","minLength":1,"maxLength":300},"amount":{"type":"integer","minimum":100,"maximum":100000000},"day_of_month":{"type":"integer","minimum":1,"maximum":31},"start_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"total_cycles":{"type":"integer","minimum":1,"maximum":600},"charge_now":{"default":false,"type":"boolean"},"collection_method":{"default":"card","type":"string","enum":["card","invoice"]},"interval":{"default":"month","type":"string","enum":["week","month","year"]},"interval_count":{"default":1,"type":"integer","minimum":1,"maximum":52},"items":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":100000},"unit_price":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"sku":{"type":"string","maxLength":40},"unit":{"type":"string","maxLength":20},"vat_category":{"type":"string","enum":["standard","zero_export","zero_other","exempt","eilat","non_taxable"]}}}},"prices_include_vat":{"default":true,"type":"boolean"},"trial_days":{"type":"integer","minimum":1,"maximum":365},"setup_fee":{"default":0,"type":"integer","minimum":0,"maximum":100000000},"coupon_code":{"type":"string","minLength":1,"maxLength":40},"invoice_document_type":{"anyOf":[{"type":"number","const":305},{"type":"number","const":300}]},"invoice_notes":{"type":"string","maxLength":1000},"invoice_due_days":{"type":"integer","minimum":0,"maximum":120},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}},"mandate":{"type":"object","properties":{"accepted_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"ip":{"type":"string","maxLength":64},"user_agent":{"type":"string","maxLength":400},"terms_text":{"type":"string","minLength":1,"maxLength":4000},"terms_version":{"type":"string","maxLength":60},"accepted_by_name":{"type":"string","maxLength":200},"evidence":{"type":"string","maxLength":1000}}}},"required":["customer_id","description"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions/{id}":{"get":{"operationId":"getSubscriptionsById","summary":"Get a standing order","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchSubscriptionsById","summary":"Change amount, lines, schedule, card, cycle cap, coupon or metadata from the next cycle","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"amount":{"type":"integer","minimum":100,"maximum":100000000},"day_of_month":{"type":"integer","minimum":1,"maximum":31},"payment_method_id":{"type":"string"},"items":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"default":1,"type":"number","exclusiveMinimum":0,"maximum":100000},"unit_price":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"sku":{"type":"string","maxLength":40},"unit":{"type":"string","maxLength":20},"vat_category":{"type":"string","enum":["standard","zero_export","zero_other","exempt","eilat","non_taxable"]}}}},"prices_include_vat":{"type":"boolean"},"interval":{"type":"string","enum":["week","month","year"]},"interval_count":{"type":"integer","minimum":1,"maximum":52},"total_cycles":{"anyOf":[{"type":"integer","minimum":1,"maximum":600},{"type":"null"}]},"coupon_code":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"invoice_notes":{"type":"string","maxLength":1000},"invoice_due_days":{"type":"integer","minimum":0,"maximum":120},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}},"notify_customer":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions/{id}/pause":{"post":{"operationId":"postSubscriptionsByIdPause","summary":"Pause","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions/{id}/resume":{"post":{"operationId":"postSubscriptionsByIdResume","summary":"Resume from the next billing date","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions/{id}/cancel":{"post":{"operationId":"postSubscriptionsByIdCancel","summary":"Cancel (optional reason; the customer is emailed a confirmation unless notify_customer is false)","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300},"notify_customer":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscriptions/{id}/charges":{"get":{"operationId":"getSubscriptionsByIdCharges","summary":"Cycles of a standing order","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/subscription-charges/{id}/retry":{"post":{"operationId":"postSubscriptionChargesByIdRetry","summary":"Charge a declined cycle again now","description":"For an invoice-only cycle stopped for review: issues and sends its document again (a refused allocation number is decided on the allocations screen).","tags":["Subscriptions"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Charge"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints":{"get":{"operationId":"getWebhookEndpoints","summary":"List webhook endpoints","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postWebhookEndpoints","summary":"Add an endpoint (secret returned once)","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":200},"events":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}}},"required":["url"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{id}":{"get":{"operationId":"getWebhookEndpointsById","summary":"Get an endpoint","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchWebhookEndpointsById","summary":"Change URL, filter or status","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":200},"events":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},"status":{"type":"string","enum":["enabled","disabled"]}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteWebhookEndpointsById","summary":"Delete an endpoint","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{id}/rotate-secret":{"post":{"operationId":"postWebhookEndpointsByIdRotateSecret","summary":"Rotate the secret, keeping the previous one signing for an overlap window","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"previous_valid_hours":{"default":24,"type":"integer","minimum":0,"maximum":72}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{id}/test":{"post":{"operationId":"postWebhookEndpointsByIdTest","summary":"Send a ping event now","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{id}/deliveries":{"get":{"operationId":"getWebhookEndpointsByIdDeliveries","summary":"Recent deliveries to the endpoint","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"operationId":"getEvents","summary":"Events of the last 30 days","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events/{id}":{"get":{"operationId":"getEventsById","summary":"Get an event","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events/{id}/redeliver":{"post":{"operationId":"postEventsByIdRedeliver","summary":"Send an event again now","tags":["Webhooks"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint_id":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shaam/connect-link":{"post":{"operationId":"postShaamConnectLink","summary":"Create a session-less consent link for the business's authorized person","description":"The person opens it and authorizes Viper Pay at the Tax Authority. A partner calls it acting for its business (Viper-Business) and needs the capability shaamLinks.","tags":["Israel Invoice"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"shaam","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expires_in_days":{"type":"integer"},"send_to_email":{"type":"string","format":"email"}}}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shaam/status":{"get":{"operationId":"getShaamStatus","summary":"Israel Invoice connection and allocations waiting","tags":["Israel Invoice"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"shaam","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shaam/documents/{id}/allocation":{"get":{"operationId":"getShaamDocumentsByIdAllocation","summary":"Allocation of a document and every request made for it","tags":["Israel Invoice"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"shaam","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postShaamDocumentsByIdAllocation","summary":"Record a number obtained outside the API","tags":["Israel Invoice"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"shaam","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["allocation_number","source"],"properties":{"allocation_number":{"type":"string"},"source":{"type":"string","enum":["web_app","emergency"]}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shaam/documents/{id}/retry":{"post":{"operationId":"postShaamDocumentsByIdRetry","summary":"Ask the Tax Authority again now","tags":["Israel Invoice"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"shaam","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shaam/refusals":{"get":{"operationId":"getShaamRefusals","summary":"Refusals waiting for the business's decision","tags":["Israel Invoice"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"shaam","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shaam/refusals/{id}/retry":{"post":{"operationId":"postShaamRefusalsByIdRetry","summary":"Ask the Tax Authority again after a further objection","description":"An issued invoice is retried in place; one that was held back is issued only if the Tax Authority approves it now. A new refusal answers 409 allocation_refused.","tags":["Israel Invoice"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"shaam","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shaam/refusals/{id}/decision":{"post":{"operationId":"postShaamRefusalsByIdDecision","summary":"Decide on a refusal","tags":["Israel Invoice"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"inferred from the path: <resource>:read for GET, <resource>:write otherwise","x-viperpay-module":"shaam","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["decision"],"properties":{"decision":{"type":"string","enum":["cancel","continue","reverse_charge","further_objection"]}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner":{"get":{"operationId":"getPartner","summary":"The partner account of this key","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"partner:read","parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Partner"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/api-keys":{"get":{"operationId":"getPartnerApiKeys","summary":"The partner's keys, both modes (never the keys themselves)","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"partner:read","parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiKeyList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postPartnerApiKeys","summary":"Mint a TEST partner key (vp_pk_test_): it opens and acts only for sandbox businesses","description":"Never wider than the calling key. Live partner keys are created only in the partner dashboard.","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"keys:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiKey"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/api-keys/{id}":{"delete":{"operationId":"deletePartnerApiKeysById","summary":"Revoke one of the partner's test keys","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"keys:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/businesses":{"get":{"operationId":"getPartnerBusinesses","summary":"List the partner's businesses with readiness","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"external_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"tax_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","disabled","suspended"]}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postPartnerBusinesses","summary":"Open an issuing business for a client (optionally invite its owner)","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"business_type":{"type":"string","enum":["osek_murshe","osek_patur","company","non_profit"]},"tax_id":{"type":"string","maxLength":20},"allow_duplicate_tax_id":{"type":"boolean"},"address":{"type":"object","properties":{"street":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"zip":{"type":"string","maxLength":20}}},"contact":{"type":"object","properties":{"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":200}}},"alert_email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"branding":{"type":"object","properties":{"logo":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":1000}},"required":["url"]},{"type":"object","properties":{"base64":{"type":"string","minLength":1,"maxLength":400000},"content_type":{"type":"string","enum":["image/png","image/jpeg"]}},"required":["base64"]},{"type":"null"}]},"brand_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"document_footer":{"type":"string","maxLength":300}}},"email":{"type":"object","properties":{"from_name":{"type":"string","maxLength":80},"reply_to":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]}}},"allocate_all_invoices":{"type":"boolean"},"signing_authorized":{"type":"boolean","const":true},"starting_numbers":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d{3}$"},"additionalProperties":{"type":"integer","minimum":1,"maximum":2000000000}},"retry":{"type":"object","properties":{"interval_days":{"type":"integer","minimum":1,"maximum":30},"max_retries":{"type":"integer","minimum":0,"maximum":10}}},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}},"owner":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":200},"send_email":{"default":true,"type":"boolean"}},"required":["email"]}},"required":["name","business_type","tax_id"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/businesses/external/{external_id}":{"get":{"operationId":"getPartnerBusinessesExternalByExternalId","summary":"Get a business by your id","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:read","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putPartnerBusinessesExternalByExternalId","summary":"Create or update a business by your id (201 / 200)","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:write","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"business_type":{"type":"string","enum":["osek_murshe","osek_patur","company","non_profit"]},"tax_id":{"type":"string","maxLength":20},"allow_duplicate_tax_id":{"type":"boolean"},"address":{"type":"object","properties":{"street":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"zip":{"type":"string","maxLength":20}}},"contact":{"type":"object","properties":{"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":200}}},"alert_email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"branding":{"type":"object","properties":{"logo":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":1000}},"required":["url"]},{"type":"object","properties":{"base64":{"type":"string","minLength":1,"maxLength":400000},"content_type":{"type":"string","enum":["image/png","image/jpeg"]}},"required":["base64"]},{"type":"null"}]},"brand_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"document_footer":{"type":"string","maxLength":300}}},"email":{"type":"object","properties":{"from_name":{"type":"string","maxLength":80},"reply_to":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]}}},"allocate_all_invoices":{"type":"boolean"},"signing_authorized":{"type":"boolean","const":true},"starting_numbers":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d{3}$"},"additionalProperties":{"type":"integer","minimum":1,"maximum":2000000000}},"retry":{"type":"object","properties":{"interval_days":{"type":"integer","minimum":1,"maximum":30},"max_retries":{"type":"integer","minimum":0,"maximum":10}}},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["name","business_type","tax_id"]}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/businesses/{id}":{"get":{"operationId":"getPartnerBusinessesById","summary":"Get a business","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchPartnerBusinessesById","summary":"Update a business (tax id locked after the first document or SHAAM)","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"business_type":{"type":"string","enum":["osek_murshe","osek_patur","company","non_profit"]},"tax_id":{"type":"string","maxLength":20},"allow_duplicate_tax_id":{"type":"boolean"},"address":{"type":"object","properties":{"street":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"zip":{"type":"string","maxLength":20}}},"contact":{"type":"object","properties":{"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":200}}},"alert_email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"branding":{"type":"object","properties":{"logo":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":1000}},"required":["url"]},{"type":"object","properties":{"base64":{"type":"string","minLength":1,"maxLength":400000},"content_type":{"type":"string","enum":["image/png","image/jpeg"]}},"required":["base64"]},{"type":"null"}]},"brand_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"document_footer":{"type":"string","maxLength":300}}},"email":{"type":"object","properties":{"from_name":{"type":"string","maxLength":80},"reply_to":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]}}},"allocate_all_invoices":{"type":"boolean"},"signing_authorized":{"type":"boolean","const":true},"starting_numbers":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d{3}$"},"additionalProperties":{"type":"integer","minimum":1,"maximum":2000000000}},"retry":{"type":"object","properties":{"interval_days":{"type":"integer","minimum":1,"maximum":30},"max_retries":{"type":"integer","minimum":0,"maximum":10}}},"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/businesses/{id}/disable":{"post":{"operationId":"postPartnerBusinessesByIdDisable","summary":"Disable API writes for the business","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"default":"","type":"string","maxLength":300}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/businesses/{id}/reactivate":{"post":{"operationId":"postPartnerBusinessesByIdReactivate","summary":"Undo disable","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/businesses/{id}/invitations":{"get":{"operationId":"getPartnerBusinessesByIdInvitations","summary":"Invitations of the business","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postPartnerBusinessesByIdInvitations","summary":"Invite the owner (or a member) to a login","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":200},"role":{"default":"owner","type":"string","enum":["owner","admin","accountant","clerk","member"]},"send_email":{"default":true,"type":"boolean"}},"required":["email"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/businesses/{id}/api-keys":{"get":{"operationId":"getPartnerBusinessesByIdApiKeys","summary":"Business keys (owner-made keys listed, not revocable by the partner)","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"businesses:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postPartnerBusinessesByIdApiKeys","summary":"Mint a business key (vp_sk_) for the business","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"keys:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":40}},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["name"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithSecret"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/businesses/{id}/api-keys/{key_id}":{"delete":{"operationId":"deletePartnerBusinessesByIdApiKeysByKeyId","summary":"Revoke a key the partner minted","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"keys:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/usage":{"get":{"operationId":"getPartnerUsage","summary":"Usage of the partner's businesses in a month","tags":["Partner"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"usage:read","parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},{"name":"business_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/webhook-endpoints":{"get":{"operationId":"getPartnerWebhookEndpoints","summary":"List partner endpoints (events of every business)","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:read","parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postPartnerWebhookEndpoints","summary":"Add a partner endpoint","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":200},"events":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}}},"required":["url"]}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/webhook-endpoints/{id}":{"get":{"operationId":"getPartnerWebhookEndpointsById","summary":"Get a partner endpoint","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchPartnerWebhookEndpointsById","summary":"Change a partner endpoint","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":200},"events":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},"status":{"type":"string","enum":["enabled","disabled"]}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePartnerWebhookEndpointsById","summary":"Delete a partner endpoint","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/webhook-endpoints/{id}/rotate-secret":{"post":{"operationId":"postPartnerWebhookEndpointsByIdRotateSecret","summary":"Rotate a partner endpoint's secret","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"previous_valid_hours":{"default":24,"type":"integer","minimum":0,"maximum":72}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/webhook-endpoints/{id}/test":{"post":{"operationId":"postPartnerWebhookEndpointsByIdTest","summary":"Send a ping","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/webhook-endpoints/{id}/deliveries":{"get":{"operationId":"getPartnerWebhookEndpointsByIdDeliveries","summary":"Recent deliveries","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/events":{"get":{"operationId":"getPartnerEvents","summary":"Events of the partner's businesses and its own","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"business_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/events/{id}":{"get":{"operationId":"getPartnerEventsById","summary":"Get an event","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/events/{id}/redeliver":{"post":{"operationId":"postPartnerEventsByIdRedeliver","summary":"Send an event again","tags":["Partner webhooks"],"security":[{"partnerKey":[]}],"x-viperpay-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint_id":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/openfrmt":{"post":{"operationId":"postReportsOpenfrmt","summary":"Produce the uniform-structure files (OPENFRMT 1.31) for a range of document dates","description":"Answers a report run. status 'ready': download_url serves a zip of OPENFRMT/<8 digits>.<YY>/<MMDDhhmm>/INI.TXT and BKMVDATA.zip. A large range answers status 'pending' and is built in the background; the report.ready webhook (or GET /reports/runs/{id}) tells when. Send Idempotency-Key: a retry returns the same run instead of a new file with a new primary identifier. Producing a report needs reports:write (a read-only key may list and download runs, not produce them); API runs have their own quota of 30 an hour per business, apart from the app's (429 rate_limited). transmit: true marks a file the Tax Authority demanded: it is sent to the Tax Authority as soon as it is ready (Addendum 1; GET /reports/runs/{id}/transmissions and the report.transmission_updated webhook follow it).","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:write","x-viperpay-module":"reports","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"First document date, inclusive (Israel time)"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Last document date, inclusive; not after today"},"transmit":{"default":false,"description":"The file answers a demand of the Tax Authority, for the period it demanded: send it to the Tax Authority the moment it is ready (Addendum 1). Leave false for a file for the accountant.","type":"boolean"}},"required":["from","to"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRun"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/pcn874":{"post":{"operationId":"postReportsPcn874","summary":"Produce the PCN874 detailed VAT report (sales side) of a VAT period that has ended","description":"Answers 409 allocations_pending when invoices of the period still wait for an allocation number, unless confirm_pending is true. The file holds sales only (Viper Pay records no purchase invoices); the accountant adds the inputs.","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:write","x-viperpay-module":"reports","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-?\\d{2}$","description":"The month that ends the VAT period, YYYYMM"},"months":{"default":1,"description":"1: monthly filer; 2: bi-monthly (the period ends in an even month)","anyOf":[{"type":"number","const":1},{"type":"number","const":2}]},"confirm_pending":{"default":false,"description":"Issue even though invoices of the period still wait for an allocation number","type":"boolean"}},"required":["period"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRun"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/accountant":{"post":{"operationId":"postReportsAccountant","summary":"Produce the accountant's export: documents, lines, receipts, monthly VAT summary and customers (CSV zip or XLSX)","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:write","x-viperpay-module":"reports","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"format":{"default":"zip","description":"zip: CSV files in a zip; xlsx: one workbook","type":"string","enum":["zip","xlsx"]}},"required":["from","to"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRun"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/hashavshevet":{"post":{"operationId":"postReportsHashavshevet","summary":"Produce journal entries for Hashavshevet (MOVEIN.DAT, 180-character records) from the business's account map","description":"Answers a report run whose file is a zip of MOVEIN.DAT (Windows-1255, CR LF), movein-preview.csv and README.txt. 422 accounts_missing names an account the period needs and the map lacks (PUT /reports/hashavshevet/accounts). The layout is not published by Hashavshevet; load a small file into a test company first (docs/reports.md).","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:write","x-viperpay-module":"reports","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"First document date, inclusive (Israel time)"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Last document date, inclusive; not after today"}},"required":["from","to"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRun"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/hashavshevet/accounts":{"get":{"operationId":"getReportsHashavshevetAccounts","summary":"The Hashavshevet account map of the business","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:read","x-viperpay-module":"reports","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashavshevetAccountMap"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putReportsHashavshevetAccounts","summary":"Replace the Hashavshevet account map (ledger accounts, movement types, customers' own accounts)","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:write","x-viperpay-module":"reports","parameters":[{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"default":{},"type":"object","properties":{"customers":{"type":"string","maxLength":8,"description":"Customers (debtors), for a customer without an account of its own"},"income":{"type":"string","maxLength":8,"description":"Income subject to VAT; for a business that does not charge VAT, all income"},"incomeZero":{"type":"string","maxLength":8,"description":"Zero-rated income (exports)"},"incomeExempt":{"type":"string","maxLength":8,"description":"Exempt income and amounts outside the scope of VAT"},"vat":{"type":"string","maxLength":8,"description":"Output VAT"},"cash":{"type":"string","maxLength":8,"description":"The account's key in the Hashavshevet company (up to 8 characters)"},"cheques":{"type":"string","maxLength":8,"description":"The account's key in the Hashavshevet company (up to 8 characters)"},"cards":{"type":"string","maxLength":8,"description":"The account's key in the Hashavshevet company (up to 8 characters)"},"transfers":{"type":"string","maxLength":8,"description":"Bank transfers, standing orders, Bit, PayBox"},"other":{"type":"string","maxLength":8,"description":"Vouchers, PayPal and other methods"},"withholding":{"type":"string","maxLength":8,"description":"Income tax withheld at source by the payer"}},"additionalProperties":false},"movement_types":{"default":{},"type":"object","properties":{"invoice":{"type":"string","maxLength":3,"description":"A movement type code defined in the Hashavshevet company"},"credit":{"type":"string","maxLength":3,"description":"A movement type code defined in the Hashavshevet company"},"receipt":{"type":"string","maxLength":3,"description":"A movement type code defined in the Hashavshevet company"}},"additionalProperties":false},"customer_accounts":{"default":{},"description":"A customer's own account, by customer key (customers.csv, uniform file field 1225)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":8,"description":"The account's key in the Hashavshevet company (up to 8 characters)"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashavshevetAccountMap"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/runs":{"get":{"operationId":"getReportsRuns","summary":"Report runs of the business, newest first","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:read","x-viperpay-module":"reports","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor of the previous page"},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["openfrmt","pcn874","accountant","hashavshevet"]}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRunList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/runs/{id}":{"get":{"operationId":"getReportsRunsById","summary":"A report run","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:read","x-viperpay-module":"reports","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRun"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/runs/{id}/download":{"get":{"operationId":"getReportsRunsByIdDownload","summary":"Download the stored file of a ready run (the same bytes every time; audited)","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:read","x-viperpay-module":"reports","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/ReportFile"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/runs/{id}/transmissions":{"get":{"operationId":"getReportsRunsByIdTransmissions","summary":"Transmissions of a uniform-file run to the Tax Authority, newest first","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:read","x-viperpay-module":"reports","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTransmissionList"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postReportsRunsByIdTransmissions","summary":"Transmit a ready uniform file (INI.TXT + BKMVDATA.TXT) to the Tax Authority (Addendum 1)","description":"Sends a ready uniform file to the Tax Authority: one produced without transmit: true, or again after the business connected to the Tax Authority or after a failure. Answers the transmission: 'uploaded' (waiting for the verdict), 'approved', or 'pending' for a large file or a retry; the report.transmission_updated webhook tells each change. 409 transmission_in_progress, transmission_refused (a test file for production, a run already approved) or shaam_not_connected.","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:write","x-viperpay-module":"reports","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"representor_company_id":{"description":"The representative's file number, when an accountant's office sends the file on the business's behalf (Addendum 1, table 2.1 field 4)","type":"string","pattern":"^\\d{1,9}$"},"case_number":{"description":"The business's file number at the Tax Authority (caseNumber); default: the business's tax_case_number setting, else its tax id","type":"string","pattern":"^\\d{1,9}$"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTransmission"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/documents":{"get":{"operationId":"getReportsDocuments","summary":"Document count and total per appendix-1 document type (uniform-structure spec §2.6 ב)","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:read","x-viperpay-module":"reports","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"First document date, inclusive"},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Last document date, inclusive"},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTypeReport"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/vat-summary":{"get":{"operationId":"getReportsVatSummary","summary":"Income and VAT per month, and what was received (net of cancelling receipts and refunds on credit invoices)","tags":["Reports"],"security":[{"businessKey":[]},{"partnerKey":[]}],"x-viperpay-scope":"reports:read","x-viperpay-module":"reports","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"First document date, inclusive"},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Last document date, inclusive"},{"$ref":"#/components/parameters/ViperBusiness"},{"$ref":"#/components/parameters/ViperBusinessExternalId"}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatSummary"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenapiJson","summary":"This document","tags":["Meta"],"security":[],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"default":{"description":"Error","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"payment.succeeded":{"post":{"operationId":"webhook_payment_succeeded","summary":"A card charge succeeded: a charge from the API (POST /charges) or the dashboard, or a payment page (then with checkout_id, purpose, metadata and answers). Standing-order cycles announce subscription.charge_succeeded instead.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment.succeeded"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment.succeeded"},"data":{"type":"object","properties":{"transaction_id":{"type":"string"},"amount":{"type":"integer"},"customer_id":{"type":["string","null"]},"document_id":{"type":["string","null"]},"checkout_id":{"type":"string"},"mode":{"type":"string"},"purpose":{"type":"string"},"metadata":{"type":"object"},"answers":{"type":"array"}},"required":["transaction_id","amount"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment.failed":{"post":{"operationId":"webhook_payment_failed","summary":"A charge was declined or failed (never sent for an outcome that is not known yet).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment.failed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment.failed"},"data":{"type":"object","properties":{"transaction_id":{"type":["string","null"]},"amount":{"type":"integer"},"customer_id":{"type":["string","null"]},"checkout_id":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["code","message"]}},"required":["amount","error"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment.refunded":{"post":{"operationId":"webhook_payment_refunded","summary":"Money went back to the card (POST /transactions/{id}/refunds, the dashboard, or a cancellation with refund_card). document_id: the credit invoice / cancelling receipt, when issued.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment.refunded"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment.refunded"},"data":{"type":"object","properties":{"transaction_id":{"type":"string"},"refund_id":{"type":"string"},"amount":{"type":"integer"},"refunded_total":{"type":"integer"},"remaining":{"type":"integer"},"document_id":{"type":["string","null"]}},"required":["transaction_id","amount"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment.pending":{"post":{"operationId":"webhook_payment_pending","summary":"The acquirer waits for the cardholder (3-D Secure, Bit). Not a decline.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment.pending"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment.pending"},"data":{"type":"object","properties":{"checkout_id":{"type":"string"},"intent_id":{"type":"string"},"amount":{"type":"integer"}},"required":["checkout_id","intent_id","amount"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment.needs_review":{"post":{"operationId":"webhook_payment_needs_review","summary":"A person must look at a payment: the outcome could not be learned, a second payment on a single-use page, a refund beyond the charge, a document missing after retries.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment.needs_review"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment.needs_review"},"data":{"type":"object","properties":{"transaction_id":{"type":["string","null"]},"intent_id":{"type":"string"},"refund_id":{"type":"string"},"checkout_id":{"type":"string"},"amount":{"type":"integer"},"reason":{"type":"string"}},"required":["reason"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment.refund_failed":{"post":{"operationId":"webhook_payment_refund_failed","summary":"The acquirer refused a refund; nothing was returned. It can be tried again.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment.refund_failed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment.refund_failed"},"data":{"type":"object","properties":{"transaction_id":{"type":"string"},"refund_id":{"type":"string"},"amount":{"type":"integer"},"error":{"type":"object","properties":{"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["code","message"]}},"required":["transaction_id","refund_id","amount","error"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.issued":{"post":{"operationId":"webhook_document_issued","summary":"A document was issued (every document, from every channel, exactly once).","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.issued"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.issued"},"data":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/DocumentSummary"}},"required":["document"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.cancelled":{"post":{"operationId":"webhook_document_cancelled","summary":"A document was cancelled or credited: reversal_id is the credit invoice / cancelling receipt (null when a 300 is only marked cancelled); fully_cancelled is false for a partial credit.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.cancelled"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.cancelled"},"data":{"type":"object","properties":{"document_id":{"type":"string"},"reversal_id":{"type":["string","null"]},"fully_cancelled":{"type":"boolean"},"amount":{"type":["integer","null"]},"reason":{"type":"string"}},"required":["document_id","reversal_id","fully_cancelled","amount","reason"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.paid":{"post":{"operationId":"webhook_document_paid","summary":"An invoice is now paid in full (receipt_id: the receipt that paid it; null when a tax invoice replaced a paid חשבון עסקה).","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.paid"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.paid"},"data":{"type":"object","properties":{"document_id":{"type":"string"},"receipt_id":{"type":["string","null"]}},"required":["document_id","receipt_id"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.signed":{"post":{"operationId":"webhook_document_signed","summary":"The signed PDF of a version of the document exists: GET /documents/{id}/pdf serves it.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.signed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.signed"},"data":{"type":"object","properties":{"document":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"integer"},"number":{"type":"integer"},"issue_date":{"type":"string"}},"required":["id","type","number","issue_date"]},"revision":{"type":"string"},"signature":{"$ref":"#/components/schemas/Signature"}},"required":["document","revision","signature"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.signing_failed":{"post":{"operationId":"webhook_document_signing_failed","summary":"Signing is held (with the reason); it is retried automatically. The PDF answers 409 signature_pending meanwhile.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.signing_failed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.signing_failed"},"data":{"type":"object","properties":{"document":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"integer"},"number":{"type":"integer"},"issue_date":{"type":"string"}},"required":["id","type","number","issue_date"]},"revision":{"type":"string"},"signature":{"$ref":"#/components/schemas/Signature"}},"required":["document","revision","signature"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.updated":{"post":{"operationId":"webhook_document_updated","summary":"A new version was signed after the document changed (its allocation number arrived, it was cancelled).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.updated"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.updated"},"data":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/DocumentSummary"},"change":{"type":"string","enum":["allocation_number","cancelled","other"]},"signature":{"$ref":"#/components/schemas/Signature"}},"required":["document","change","signature"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.allocation_updated":{"post":{"operationId":"webhook_document_allocation_updated","summary":"The Tax Authority's allocation number arrived after document.issued: right after it when the document was issued first and the number requested after the commit (issue_without_allocation, card payments), or later, on a retry. Once per document.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.allocation_updated"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.allocation_updated"},"data":{"type":"object","properties":{"document_id":{"type":"string"},"allocation_status":{"type":"string"},"allocation_number":{"type":["string","null"]},"document":{"$ref":"#/components/schemas/DocumentSummary"}},"required":["document_id","allocation_status","allocation_number","document"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.allocation_refused":{"post":{"operationId":"webhook_document_allocation_refused","summary":"The Tax Authority refused an allocation number; the business decides (GET /shaam/refusals).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.allocation_refused"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.allocation_refused"},"data":{"type":"object","properties":{"document_id":{"type":"string"},"refusal_id":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["document_id","refusal_id","code","message"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"document.reminder_sent":{"post":{"operationId":"webhook_document_reminder_sent","summary":"An unpaid-invoice reminder was sent to the customer.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"document.reminder_sent"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"document.reminder_sent"},"data":{"type":"object","properties":{"document_id":{"type":"string"},"payment_request_id":{"type":"string"},"days_from_due":{"type":"integer"},"days_overdue":{"type":"integer"},"channels":{"type":"array","items":{"type":"string"}}},"required":["document_id","payment_request_id","days_from_due","days_overdue","channels"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"shaam.connected":{"post":{"operationId":"webhook_shaam_connected","summary":"The business is connected to Israel Invoice (via: link or app).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"shaam.connected"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"shaam.connected"},"data":{"type":"object","properties":{"via":{"type":"string"}},"required":["via"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"shaam.expiring":{"post":{"operationId":"webhook_shaam_expiring","summary":"The consent given at the Tax Authority expires soon; send a new connect link.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"shaam.expiring"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"shaam.expiring"},"data":{"type":"object","properties":{"consent_expires_at":{"type":"string"}},"required":["consent_expires_at"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"shaam.reconnect_required":{"post":{"operationId":"webhook_shaam_reconnect_required","summary":"The Tax Authority no longer accepts the connection; the authorized person must connect again.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"shaam.reconnect_required"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"shaam.reconnect_required"},"data":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"customer.created":{"post":{"operationId":"webhook_customer_created","summary":"A customer was created.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"customer.created"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"customer.created"},"data":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"customer.updated":{"post":{"operationId":"webhook_customer_updated","summary":"A customer was changed (consent withdrawals included).","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"customer.updated"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"customer.updated"},"data":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"customer.archived":{"post":{"operationId":"webhook_customer_archived","summary":"A customer with documents or charges was archived instead of deleted.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"customer.archived"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"customer.archived"},"data":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"customer.restored":{"post":{"operationId":"webhook_customer_restored","summary":"An archived customer was restored.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"customer.restored"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"customer.restored"},"data":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.created":{"post":{"operationId":"webhook_subscription_created","summary":"A standing order was opened.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.created"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.created"},"data":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"}},"required":["subscription"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.updated":{"post":{"operationId":"webhook_subscription_updated","summary":"A standing order changed from its next cycle (changes: the fields).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.updated"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.updated"},"data":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"},"changes":{"type":"array","items":{"type":"string"}}},"required":["subscription","changes"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.paused":{"post":{"operationId":"webhook_subscription_paused","summary":"Paused.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.paused"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.paused"},"data":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"}},"required":["subscription"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.resumed":{"post":{"operationId":"webhook_subscription_resumed","summary":"Resumed by a person (then subscription), or back to active after its declined cycle was paid (then subscription_id, reason declined_cycle_paid and next_charge_date). Recorded in the transaction of the change either way, and sent as soon as it commits.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.resumed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.resumed"},"data":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"},"subscription_id":{"type":"string"},"reason":{"type":"string"},"next_charge_date":{"type":["string","null"]}},"required":[]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.cancelled":{"post":{"operationId":"webhook_subscription_cancelled","summary":"Cancelled for good.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.cancelled"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.cancelled"},"data":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"},"cancelled_by":{"type":["string","null"]},"reason":{"type":["string","null"]}},"required":["subscription","cancelled_by","reason"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.completed":{"post":{"operationId":"webhook_subscription_completed","summary":"A fixed-count order's last cycle was paid or settled.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.completed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.completed"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"cycles_paid":{"type":["integer","null"]}},"required":["subscription_id","cycles_paid"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.charge_succeeded":{"post":{"operationId":"webhook_subscription_charge_succeeded","summary":"A cycle was paid (by card, or by transfer for an invoice order: paid_by transfer). document_pending: its document is still being issued; subscription.charge_document_issued follows.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.charge_succeeded"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.charge_succeeded"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"charge_id":{"type":"string"},"transaction_id":{"type":["string","null"]},"amount":{"type":"integer"},"cycle":{"type":"integer"},"document_id":{"type":["string","null"]},"document_url":{"type":["string","null"]},"document_pending":{"type":"boolean"},"paid_by":{"type":"string"},"livemode":{"type":"boolean"}},"required":["subscription_id","charge_id","amount","cycle","document_id"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.charge_failed":{"post":{"operationId":"webhook_subscription_charge_failed","summary":"A cycle's charge was declined (final: no more automatic retries).","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.charge_failed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.charge_failed"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"charge_id":{"type":"string"},"attempt":{"type":"integer"},"final":{"type":"boolean"},"decline_class":{"type":"string"},"next_attempt_at":{"type":["string","null"]},"error":{"type":"object","properties":{"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["code","message"]}},"required":["subscription_id","charge_id","attempt","final","decline_class","next_attempt_at","error"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.past_due":{"post":{"operationId":"webhook_subscription_past_due","summary":"The order moved to past_due after a final decline.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.past_due"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.past_due"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"charge_id":{"type":"string"}},"required":["subscription_id","charge_id"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.charge_needs_review":{"post":{"operationId":"webhook_subscription_charge_needs_review","summary":"A cycle stopped for a person (repeated errors that are not a decline, an unknown outcome).","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.charge_needs_review"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.charge_needs_review"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"charge_id":{"type":"string"},"reason":{"type":["string","null"]},"message":{"type":"string"}},"required":["subscription_id","charge_id","reason","message"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.charge_dismissed":{"post":{"operationId":"webhook_subscription_charge_dismissed","summary":"A cycle was taken off the declined list (paid elsewhere, or written off).","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.charge_dismissed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.charge_dismissed"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"charge_id":{"type":"string"},"resolution":{"type":"string"},"amount":{"type":"integer"}},"required":["subscription_id","charge_id","resolution","amount"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.charge_invoiced":{"post":{"operationId":"webhook_subscription_charge_invoiced","summary":"An invoice order's cycle document was issued and sent.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.charge_invoiced"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.charge_invoiced"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"charge_id":{"type":"string"},"amount":{"type":"integer"},"cycle":{"type":"integer"},"document_id":{"type":"string"},"document_url":{"type":"string"},"delivery":{"type":"string"}},"required":["subscription_id","charge_id","amount","cycle","document_id","document_url","delivery"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.trial_will_end":{"post":{"operationId":"webhook_subscription_trial_will_end","summary":"The trial ends soon; the first charge date follows.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.trial_will_end"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.trial_will_end"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"trial_ends_at":{"type":"string"},"first_charge_date":{"type":["string","null"]}},"required":["subscription_id","trial_ends_at","first_charge_date"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"subscription.charge_document_issued":{"post":{"operationId":"webhook_subscription_charge_document_issued","summary":"The document of a cycle announced earlier with document_pending now exists.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"subscription.charge_document_issued"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"subscription.charge_document_issued"},"data":{"type":"object","properties":{"subscription_id":{"type":"string"},"charge_id":{"type":"string"},"transaction_id":{"type":["string","null"]},"document_id":{"type":"string"},"document_url":{"type":"string"}},"required":["subscription_id","charge_id","transaction_id","document_id","document_url"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"checkout.completed":{"post":{"operationId":"webhook_checkout_completed","summary":"A payment page or checkout session completed: a payment (transaction_id, document_id) or a standing-order sign-up (subscription_id). Confirm payments from this event or the API, never from the browser redirect.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"checkout.completed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"checkout.completed"},"data":{"type":"object","properties":{"checkout_id":{"type":"string"},"mode":{"type":"string"},"purpose":{"type":"string"},"transaction_id":{"type":"string"},"subscription_id":{"type":"string"},"customer_id":{"type":["string","null"]},"document_id":{"type":["string","null"]},"amount":{"type":["integer","null"]},"metadata":{"type":"object"},"answers":{"type":"array"}},"required":["checkout_id","mode"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"report.ready":{"post":{"operationId":"webhook_report_ready","summary":"A report run finished; download_url serves the file.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"report.ready"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"report.ready"},"data":{"$ref":"#/components/schemas/ReportRunEvent"}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"report.failed":{"post":{"operationId":"webhook_report_failed","summary":"A report run failed (error).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"report.failed"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"report.failed"},"data":{"$ref":"#/components/schemas/ReportRunEvent"}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"report.transmission_updated":{"post":{"operationId":"webhook_report_transmission_updated","summary":"A uniform file's transmission to the Tax Authority moved: uploaded, approved, rejected, not_required or failed (Addendum 1).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"report.transmission_updated"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"report.transmission_updated"},"data":{"type":"object","properties":{"id":{"type":"string"},"report_run_id":{"type":"string"},"status":{"type":"string"},"environment":{"type":"string"},"unique_id":{"type":["string","null"]},"error":{"type":["string","null"]}},"required":["id","report_run_id","status","environment","unique_id","error"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment_request.created":{"post":{"operationId":"webhook_payment_request_created","summary":"A payment link was created (invoice or amount).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment_request.created"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment_request.created"},"data":{"type":"object","properties":{"payment_request":{"$ref":"#/components/schemas/PaymentLink"}},"required":["payment_request"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment_request.paid":{"post":{"operationId":"webhook_payment_request_paid","summary":"A payment link was paid.","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment_request.paid"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment_request.paid"},"data":{"type":"object","properties":{"payment_request_id":{"type":"string"},"kind":{"type":"string"},"document_id":{"type":["string","null"]},"checkout_id":{"type":["string","null"]},"customer_id":{"type":"string"}},"required":["payment_request_id","kind","document_id","checkout_id","customer_id"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment_method.created":{"post":{"operationId":"webhook_payment_method_created","summary":"A card was saved for a customer through a setup session (POST /checkout-sessions, mode setup).","description":"Recorded right after the change committed.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment_method.created"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment_method.created"},"data":{"type":"object","properties":{"payment_method":{"$ref":"#/components/schemas/PaymentMethod"},"checkout_session_id":{"type":"string"}},"required":["payment_method","checkout_session_id"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"payment_method.deleted":{"post":{"operationId":"webhook_payment_method_deleted","summary":"A saved card was removed (DELETE /customers/{id}/payment-methods/{payment_method_id}).","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"payment_method.deleted"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"payment_method.deleted"},"data":{"type":"object","properties":{"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"business.created":{"post":{"operationId":"webhook_business_created","summary":"Partners only: an issuing business was opened.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"business.created"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"business.created"},"data":{"type":"object","properties":{"business":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":["string","null"]},"name":{"type":"string"},"tax_id":{"type":"string"}},"required":["id","external_id","name","tax_id"]}},"required":["business"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"business.updated":{"post":{"operationId":"webhook_business_updated","summary":"Partners only: a business was changed (fields).","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"business.updated"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"business.updated"},"data":{"type":"object","properties":{"business":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":["string","null"]},"name":{"type":"string"}},"required":["id","external_id","name"]},"fields":{"type":"array","items":{"type":"string"}}},"required":["business","fields"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"business.disabled":{"post":{"operationId":"webhook_business_disabled","summary":"Partners only: the partner disabled API writes for the business.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"business.disabled"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"business.disabled"},"data":{"type":"object","properties":{"business":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":["string","null"]}},"required":["id","external_id"]}},"required":["business"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"business.reactivated":{"post":{"operationId":"webhook_business_reactivated","summary":"Partners only: disable was undone.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"business.reactivated"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"business.reactivated"},"data":{"type":"object","properties":{"business":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":["string","null"]}},"required":["id","external_id"]}},"required":["business"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}},"business.owner_joined":{"post":{"operationId":"webhook_business_owner_joined","summary":"Partners only: the invited owner (or member) accepted and has a login.","description":"Recorded in the same database transaction as the change it reports.","parameters":[{"name":"X-ViperPay-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-ViperPay-Event","in":"header","required":true,"schema":{"const":"business.owner_joined"}},{"name":"X-ViperPay-Event-Id","in":"header","required":true,"schema":{"type":"string"},"description":"The same on every attempt: deduplicate by it"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"business.owner_joined"},"data":{"type":"object","properties":{"business_id":{"type":"string"},"role":{"type":"string"}},"required":["business_id","role"]}}}]}}}},"responses":{"2XX":{"description":"Accepted. Anything else (or no answer in 10 seconds) is retried."}}}}},"x-viperpay-webhooks":{"signature":"X-ViperPay-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, '<t>.<body>')>[,v1=<previous secret during rotation>]","retries":"1m, 5m, 30m, 2h, 6h, 12h, 24h, 24h; endpoints failing for 5 days are disabled","events":["payment.succeeded","payment.failed","payment.refunded","payment.pending","payment.needs_review","payment.refund_failed","document.issued","document.cancelled","document.paid","document.signed","document.signing_failed","document.updated","document.allocation_updated","document.allocation_refused","shaam.connected","shaam.expiring","shaam.reconnect_required","customer.created","customer.updated","customer.archived","customer.restored","subscription.created","subscription.updated","subscription.paused","subscription.resumed","subscription.cancelled","subscription.completed","subscription.charge_succeeded","subscription.charge_failed","subscription.past_due","subscription.charge_needs_review","subscription.charge_dismissed","subscription.charge_invoiced","subscription.trial_will_end","subscription.charge_document_issued","checkout.completed","report.ready","report.failed","report.transmission_updated","payment_request.created","payment_request.paid","document.reminder_sent","payment_method.created","payment_method.deleted","business.created","business.updated","business.disabled","business.reactivated","business.owner_joined"]},"x-viperpay-error-codes":{"unauthorized":"Missing or invalid API key. Send: Authorization: Bearer vp_sk_... (or vp_pk_... for a partner).","key_expired":"This API key has expired.","forbidden_scope":"This API key is not allowed to perform this request.","account_suspended":"This account is suspended.","partner_suspended":"This partner account is suspended.","partner_capability_disabled":"This partner account is not allowed to perform this request.","partner_key_required":"This endpoint requires a partner key (vp_pk_...).","business_required":"A partner key must name the business it acts for: send the Viper-Business header (business id) or Viper-Business-External-Id.","business_header_not_allowed":"A business key acts only for its own business; remove the Viper-Business header.","business_not_found":"No such business among this partner's businesses.","business_disabled":"The partner has disabled this business; only reads are allowed.","not_found":"No such resource.","invalid_request":"The request is invalid.","invalid_json":"The request body must be JSON.","idempotency_key_reused":"This Idempotency-Key was already used with a different request.","idempotency_in_progress":"A request with this Idempotency-Key is still in progress. Retry shortly.","idempotency_key_invalid":"The Idempotency-Key header must be 1-255 printable ASCII characters.","rate_limited":"Too many requests. Retry after the time given in Retry-After.","plan_feature_unavailable":"The business's Viper Pay plan does not include this feature.","plan_quota_exceeded":"The business has used its plan's monthly document quota.","allocation_refused":"The Tax Authority refused the allocation number; the document was not issued.","allocation_unavailable":"An allocation number could not be obtained from the Tax Authority right now; the document was not issued.","signature_pending":"The document is not available until its digital signature is complete.","read_only":"This account is read-only.","conflict":"The request conflicts with the current state of the resource.","tax_id_exists":"A business with this tax id already exists under this partner.","tax_id_locked":"The tax id and business type cannot change after documents were issued or the Tax Authority was connected.","max_businesses_reached":"This partner has reached its maximum number of businesses.","customer_has_active_subscription":"The customer has an active standing order; cancel it first.","customer_archived":"The customer is archived; restore it before charging it (no invoice or receipt could follow the charge).","numbering_locked":"Documents of this type were already issued; their numbering can no longer change.","url_not_allowed":"The URL must be a public https address.","allocations_pending":"Invoices of the period still wait for an allocation number; send confirm_pending: true to report them without one.","software_not_registered":"The software's Tax Authority registration details are not configured on this deployment.","report_not_ready":"The report is not ready yet; poll GET /api/v1/reports/runs/{id} or wait for the report.ready webhook.","report_failed":"The report could not be produced.","transmission_refused":"This report run cannot be transmitted to the Tax Authority (not a ready uniform file, a test file for production, or already approved).","transmission_in_progress":"A transmission of this report run is already under way; follow it with GET /api/v1/reports/runs/{id}/transmissions.","shaam_not_connected":"The business is not connected to the Tax Authority; its authorized person connects it first (settings, or POST /api/v1/shaam/connect-link).","accounts_missing":"The Hashavshevet account map lacks an account this period needs; set it with PUT /api/v1/reports/hashavshevet/accounts.","livemode_mismatch":"This key's mode (test or live) does not match the business it belongs to.","test_mode_only":"This operation is available to test keys only.","live_mode_only":"This operation is available to live keys only; a sandbox business cannot do it.","sandbox_not_allowed":"A sandbox business cannot do this: it never reaches the Tax Authority or a live acquirer.","card_declined":"The card was declined.","card_save_pending":"The acquirer has not confirmed whether the card was saved yet. It is checked again automatically; do not retry with another card.","refunded_no_document":"The charge was refunded before its document was issued, so no document is issued for it.","checkout_blocked":"This invoice cannot be paid by link: an earlier payment for it could not get its receipt. Contact the business.","payment_failed":"The charge could not be made.","payment_processing":"The charge's outcome is not known yet; it is checked with the acquirer. Retry the same request (same Idempotency-Key) to get the result.","idempotency_key_required":"This request moves money: send an Idempotency-Key header (your own unique value, e.g. the order id).","payment_method_in_use":"A standing order still charges this card; change its card or cancel it first.","signature_held":"The document is not signed yet.","internal_error":"Internal error.","refusal_superseded":"The refused allocation request was for an invoice of another date; the invoice must be sent to the Tax Authority again.","payments_not_configured":"Payments are not set up for this business, or this page cannot take a payment right now.","payment_provider_unsupported":"The business's payment provider is not supported.","payment_method_provider_mismatch":"The saved card belongs to another payment provider; save the card again.","payment_method_account_mismatch":"The saved card belongs to another acquirer account; save the card again.","payment_method_connection_inactive":"The saved card belongs to a disconnected acquirer connection; save the card again.","card_not_saved":"The acquirer did not return a token for the card, so it was not saved.","invalid_card":"The card details are invalid.","hosted_required":"This acquirer does not accept card details directly; the card is entered on its hosted payment page.","hosted_unsupported":"This acquirer's hosted page cannot save a card.","hosted_page_failed":"The acquirer's payment page cannot be opened right now. Retry in a few minutes.","intent_not_open":"This payment was already handled.","document_in_progress":"The document for this transaction is being issued right now. Retry shortly.","test_mode_no_document":"This is a test charge (no real money), so no accounting document is issued for it.","seller_particulars_missing":"The business's details required on its documents are incomplete.","confirm_live_required":"Live mode charges real cards and issues numbered documents. Send confirm_live: true.","connection_test_failed":"The connection test with the acquirer failed; check the credentials.","connection_test_throttled":"The connection test failed a short while ago. Wait 10 minutes before testing again, so the acquirer account is not locked.","connection_in_use":"Active standing orders charge cards saved on this connection; disconnecting would make their charges fail.","test_account_in_live_mode":"These are the acquirer's test-account credentials; choose test mode or enter the live account.","refund_exceeds_remaining":"The refund is larger than the amount that can still be refunded on this transaction (including other pending refunds).","refund_exceeds_charge":"Marking this refund as done would exceed the transaction's amount.","refund_unsupported":"This acquirer does not support refunds through Viper Pay; refund in its own system and record the refund.","refund_provider_mismatch":"The transaction was made with another payment provider and cannot be refunded from here.","refund_not_sent":"This refund was never sent to the acquirer, so there is nothing to retry; create a new refund.","refund_unknown":"The acquirer did not answer about the refund; check its system before trying again.","refund_failed":"The refund failed.","partial_refund_receipt":"A receipt can only be cancelled in full; for a partial refund choose no document and issue it yourself.","checkout_completed":"This payment page was already paid.","checkout_in_progress":"A payment on this page is in progress. Retry in a few minutes if it does not complete.","checkout_changed":"The payment page changed while it was open; reload it and try again.","bot_check_failed":"The security check failed. Try again.","already_paid":"This invoice is already paid in full.","not_payable":"This document cannot be paid by link.","nothing_due":"Nothing is due on this payment request.","payment_link_cancelled":"This payment link was stopped by the business.","link_invalid":"The link is not valid any more; request a new one.","link_used":"The link is not valid any more; ask the business for a new one.","portal_signed_out":"The customer portal session has expired; sign in again.","email_quota":"The business has used its daily email quota. Try again tomorrow.","forbidden":"You are not allowed to do this.","disabled":"This account is disabled.","email_taken":"An account with this email address already exists.","mail_unavailable":"Email sending is not configured on this deployment.","reauth_required":"Confirm your password to continue.","reauth_failed":"The password is wrong.","reauth_unavailable":"Password confirmation is not available in this session.","reset_invalid":"The password reset link is not valid any more.","invitation_invalid":"The invitation is not valid any more.","invitation_email":"The invitation was sent to another email address.","unverified":"Verify the email address first.","sign_in_required":"An account with the invited address exists; sign in to it and open the link again.","wrong_account":"The invitation was sent to another address; sign out and open the link again."}}