# Pay

All pay endpoints

## GET /v3/account/invoice/pay/prepare

> Get prepared data for the front-end to begin the pay process of invoice(s)

```json
{"openapi":"3.0.1","info":{"title":"i3D.net Endpoints","version":"3.0.0"},"tags":[{"name":"Pay","description":"All pay endpoints"}],"servers":[{"url":"https://api.i3d.net"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"PRIVATE-TOKEN","in":"header"}},"schemas":{"PayPrepare":{"type":"object","required":["totalAmount","currency","currencySign","totalSelectedInvoiceForPay","totalSelectedCreditForSettle","accountCredit"],"properties":{"totalAmount":{"type":"string","format":"","description":"The total amount of the selected invoices","readOnly":true},"currency":{"type":"string","format":"","description":"The currency that is being used"},"currencySign":{"type":"string","format":"","description":"The currency sign that is being used"},"totalSelectedInvoiceForPay":{"type":"integer","format":"integer","description":"The total selected invoices for pay"},"totalSelectedCreditForSettle":{"type":"integer","format":"integer","description":"The total selected credit invoices for settle"},"accountCredit":{"type":"string","format":"","description":"The amount of the account credit"},"invoicesForPay":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"},"description":"The selected invoices for pay"},"creditInvoices":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"},"description":"The open credit invoices"},"paymentMethod":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"},"description":"The payment method"}},"additionalProperties":false},"Invoice":{"type":"object","required":["id","creationDate","dueDate","invoiceNumber","invoiceHash","description","currency","currencySign","amountIncVAT","amountExclVAT","paymentStatus","paymentDate","isCredit","remainingAmount","totalPaidAmount"],"properties":{"id":{"type":"string","format":"","description":"The ID of the invoice","readOnly":true},"creationDate":{"type":"integer","format":"integer","description":"The date the invoice was created","readOnly":true},"dueDate":{"type":"integer","format":"integer","description":"The due date of the invoice","readOnly":true},"invoiceNumber":{"type":"string","format":"","description":"The number of the invoice","readOnly":true},"invoiceHash":{"type":"string","format":"","description":"A unique hash for this invoice","readOnly":true},"description":{"type":"string","format":"","description":"The description of the invoice"},"currency":{"type":"string","format":"","description":"The currency that is being used"},"currencySign":{"type":"string","format":"","description":"The currency sign that is being used"},"amountIncVAT":{"type":"string","format":"","description":"The amount of the invoice with VAT in cents"},"amountExclVAT":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents"},"paymentStatus":{"type":"integer","format":"integer","description":"The payment status"},"paymentDate":{"type":"integer","format":"integer","description":"The timestamp that the invoice was paid, if paid"},"isCredit":{"type":"integer","format":"integer","description":"If this field is 1 it means that invoice is a credit invoice"},"remainingAmount":{"type":"string","format":"","description":"The remaining amount of invoice"},"totalPaidAmount":{"type":"string","format":"","description":"The total paid amount of invoice"}},"additionalProperties":false},"PaymentMethod":{"type":"object","required":["id","name","isSelectable","paymentProviderId"],"properties":{"id":{"type":"integer","format":"integer","description":"The ID of the payment method"},"name":{"type":"string","format":"","description":"The name of the payment method"},"isSelectable":{"type":"integer","format":"integer","description":"if this field is 1 the end-user can use this payment method for the payment"},"paymentProviderId":{"type":"integer","format":"integer","description":"The id of the payment provider"},"issuers":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodIssuers"},"description":"the issuers of the payment method"}},"additionalProperties":false},"PaymentMethodIssuers":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"","description":"The ID of payment method issuer","readOnly":true},"name":{"type":"string","format":"","description":"The name of payment method issuer"}},"additionalProperties":false},"Error":{"type":"object","required":["errorCode","errorMessage","errors"],"properties":{"errorCode":{"type":"integer","format":"integer","description":"Error code"},"errorMessage":{"type":"string","format":"","description":"Error message"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"description":"Error details"}},"additionalProperties":false},"ErrorDetails":{"type":"object","required":["property","message"],"properties":{"property":{"type":"string","format":"","description":"Property in which there is an error"},"message":{"type":"string","format":"","description":"Error message"}},"additionalProperties":false}}},"paths":{"/v3/account/invoice/pay/prepare":{"get":{"tags":["Pay"],"summary":"Get prepared data for the front-end to begin the pay process of invoice(s)","operationId":"getAccountInvoicePayPrepares","parameters":[{"name":"invoiceIds","in":"query","description":"The invoiceId(s) to prepare pay data for separated by comma (,)<br />\nRemember to urlencode the provided invoiceIds<br />\nThe invoiceIds call would look like:<br />\n/v3/account/invoice/pay/prepare?invoiceIds=111111%2C22222%2C33333%2C44444","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayPrepare"}}}}},"403":{"description":"Invalid credentials"},"422":{"description":"Unprocessable Entity"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /v3/account/invoice/pay/register

> post invoice(s) data to register the transaction with the selected payment provider

```json
{"openapi":"3.0.1","info":{"title":"i3D.net Endpoints","version":"3.0.0"},"tags":[{"name":"Pay","description":"All pay endpoints"}],"servers":[{"url":"https://api.i3d.net"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"PRIVATE-TOKEN","in":"header"}},"schemas":{"PayRegister":{"type":"object","required":["invoiceIds","paymentMethodId","issuerId"],"properties":{"invoiceIds":{"type":"string","format":""},"paymentMethodId":{"type":"integer","format":"integer"},"issuerId":{"type":"string","format":""}},"additionalProperties":false},"PayRegisterResponse":{"type":"object","required":["requestUrl","postFormInputs","accountCredit","totalAmount","paymentMethod","invoicesForPay"],"properties":{"requestUrl":{"type":"string","format":"","description":"URL where to send the user with post form data"},"postFormInputs":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Any data that should be sent to payment provider"},"accountCredit":{"type":"string","format":"","description":"The amount of the account credit"},"totalAmount":{"type":"string","format":"","description":"Total amount to pay"},"paymentMethod":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"}],"description":"Chosen payment method"},"invoicesForPay":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"},"description":"Invoices to pay","readOnly":true}},"additionalProperties":false},"PaymentMethod":{"type":"object","required":["id","name","isSelectable","paymentProviderId"],"properties":{"id":{"type":"integer","format":"integer","description":"The ID of the payment method"},"name":{"type":"string","format":"","description":"The name of the payment method"},"isSelectable":{"type":"integer","format":"integer","description":"if this field is 1 the end-user can use this payment method for the payment"},"paymentProviderId":{"type":"integer","format":"integer","description":"The id of the payment provider"},"issuers":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodIssuers"},"description":"the issuers of the payment method"}},"additionalProperties":false},"PaymentMethodIssuers":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"","description":"The ID of payment method issuer","readOnly":true},"name":{"type":"string","format":"","description":"The name of payment method issuer"}},"additionalProperties":false},"Invoice":{"type":"object","required":["id","creationDate","dueDate","invoiceNumber","invoiceHash","description","currency","currencySign","amountIncVAT","amountExclVAT","paymentStatus","paymentDate","isCredit","remainingAmount","totalPaidAmount"],"properties":{"id":{"type":"string","format":"","description":"The ID of the invoice","readOnly":true},"creationDate":{"type":"integer","format":"integer","description":"The date the invoice was created","readOnly":true},"dueDate":{"type":"integer","format":"integer","description":"The due date of the invoice","readOnly":true},"invoiceNumber":{"type":"string","format":"","description":"The number of the invoice","readOnly":true},"invoiceHash":{"type":"string","format":"","description":"A unique hash for this invoice","readOnly":true},"description":{"type":"string","format":"","description":"The description of the invoice"},"currency":{"type":"string","format":"","description":"The currency that is being used"},"currencySign":{"type":"string","format":"","description":"The currency sign that is being used"},"amountIncVAT":{"type":"string","format":"","description":"The amount of the invoice with VAT in cents"},"amountExclVAT":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents"},"paymentStatus":{"type":"integer","format":"integer","description":"The payment status"},"paymentDate":{"type":"integer","format":"integer","description":"The timestamp that the invoice was paid, if paid"},"isCredit":{"type":"integer","format":"integer","description":"If this field is 1 it means that invoice is a credit invoice"},"remainingAmount":{"type":"string","format":"","description":"The remaining amount of invoice"},"totalPaidAmount":{"type":"string","format":"","description":"The total paid amount of invoice"}},"additionalProperties":false},"Error":{"type":"object","required":["errorCode","errorMessage","errors"],"properties":{"errorCode":{"type":"integer","format":"integer","description":"Error code"},"errorMessage":{"type":"string","format":"","description":"Error message"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"description":"Error details"}},"additionalProperties":false},"ErrorDetails":{"type":"object","required":["property","message"],"properties":{"property":{"type":"string","format":"","description":"Property in which there is an error"},"message":{"type":"string","format":"","description":"Error message"}},"additionalProperties":false}}},"paths":{"/v3/account/invoice/pay/register":{"post":{"tags":["Pay"],"summary":"post invoice(s) data to register the transaction with the selected payment provider","operationId":"createAccountInvoicePayRegister","requestBody":{"description":"EXAMPLE of the value of invoiceIds property \"111111,22222,33333,44444\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayRegister"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayRegisterResponse"}}}},"403":{"description":"Invalid credentials"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /v3/account/invoice/pay/paymentLanding

> Get invoice plus extra information to show on landing page after payment

```json
{"openapi":"3.0.1","info":{"title":"i3D.net Endpoints","version":"3.0.0"},"tags":[{"name":"Pay","description":"All pay endpoints"}],"servers":[{"url":"https://api.i3d.net"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","name":"PRIVATE-TOKEN","in":"header"}},"schemas":{"PaymentLandingResponse":{"type":"object","required":["message","status","paymentMethod","invoices"],"properties":{"message":{"type":"string","format":"","description":"Payment processing result message","readOnly":true},"status":{"type":"string","format":"","description":"Payment processing result status","readOnly":true},"paymentMethod":{"type":"string","format":"","description":"The method of the payment","readOnly":true},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"},"description":"Payment invoices","readOnly":true}},"additionalProperties":false},"Invoice":{"type":"object","required":["id","creationDate","dueDate","invoiceNumber","invoiceHash","description","currency","currencySign","amountIncVAT","amountExclVAT","paymentStatus","paymentDate","isCredit","remainingAmount","totalPaidAmount"],"properties":{"id":{"type":"string","format":"","description":"The ID of the invoice","readOnly":true},"creationDate":{"type":"integer","format":"integer","description":"The date the invoice was created","readOnly":true},"dueDate":{"type":"integer","format":"integer","description":"The due date of the invoice","readOnly":true},"invoiceNumber":{"type":"string","format":"","description":"The number of the invoice","readOnly":true},"invoiceHash":{"type":"string","format":"","description":"A unique hash for this invoice","readOnly":true},"description":{"type":"string","format":"","description":"The description of the invoice"},"currency":{"type":"string","format":"","description":"The currency that is being used"},"currencySign":{"type":"string","format":"","description":"The currency sign that is being used"},"amountIncVAT":{"type":"string","format":"","description":"The amount of the invoice with VAT in cents"},"amountExclVAT":{"type":"string","format":"","description":"The amount of the invoice without VAT in cents"},"paymentStatus":{"type":"integer","format":"integer","description":"The payment status"},"paymentDate":{"type":"integer","format":"integer","description":"The timestamp that the invoice was paid, if paid"},"isCredit":{"type":"integer","format":"integer","description":"If this field is 1 it means that invoice is a credit invoice"},"remainingAmount":{"type":"string","format":"","description":"The remaining amount of invoice"},"totalPaidAmount":{"type":"string","format":"","description":"The total paid amount of invoice"}},"additionalProperties":false},"Error":{"type":"object","required":["errorCode","errorMessage","errors"],"properties":{"errorCode":{"type":"integer","format":"integer","description":"Error code"},"errorMessage":{"type":"string","format":"","description":"Error message"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"},"description":"Error details"}},"additionalProperties":false},"ErrorDetails":{"type":"object","required":["property","message"],"properties":{"property":{"type":"string","format":"","description":"Property in which there is an error"},"message":{"type":"string","format":"","description":"Error message"}},"additionalProperties":false}}},"paths":{"/v3/account/invoice/pay/paymentLanding":{"get":{"tags":["Pay"],"summary":"Get invoice plus extra information to show on landing page after payment","operationId":"getAccountInvoicePayPaymentLandings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLandingResponse"}}}},"403":{"description":"Invalid credentials"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.i3d.net/api-references/general/pay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
