{ "error": { "type": "invalid_request_error", "code": "validation_error", "message": "One or more fields are invalid.", "details": { "customer_name": ["This field is required."], "customer_email": ["Enter a valid email address."] } }}
{ "error": { "type": "invalid_request_error", "code": "validation_error", "message": "One or more fields are invalid.", "details": { "line_items": ["At most 50 line items."] } }}
{ "error": { "type": "invalid_request_error", "code": "validation_error", "message": "One or more fields are invalid.", "details": { "customer_name": ["This field is required."], "customer_email": ["Enter a valid email address."] } }}
{ "error": { "type": "invalid_request_error", "code": "validation_error", "message": "One or more fields are invalid.", "details": { "line_items": ["At most 50 line items."] } }}
Requires X-API-KEY header.You can also pass an optional Idempotency-Key header to safely retry requests without creating duplicate records. See the Idempotency guide for details.
Body Parameters
string
required
The invoice title shown to the customer.
integer
The invoiced amount, as a whole number in cents (smallest currency unit). For example, 120000 is $1,200.00. Do not send decimals. Required unless you send line_items; if you send both, the total of the line items is used and amount is ignored.
object[]
Priced lines for the invoice. The invoice amount is the total of the lines (quantity times unit_price_cents, summed). An invoice can have at most 50 line items; a request with more is rejected (see the 400 example below).
Show properties
string
required
What the line is for. Up to 255 characters.
integer
required
The price of one unit, as a whole number in cents. At least 1.
string
default:"1"
How many units, with up to two decimal places, for example "2" or "1.5". At least 0.01.
string
Optional note for the line. Up to 1000 characters.
string
Optional unit label, for example hours. Up to 40 characters.
string
required
The customer’s full name.
email
required
The customer’s email address.
string
default:"USD"
Must be USD. Only USD payments are supported.
string
Optional description or notes for the invoice.
string
Your own id for this invoice, for example a booking or order id. Up to 255 characters; surrounding whitespace is trimmed. Blank or null means none, and invoices without one are not limited. It must be unique among your invoices: if you already used it on another invoice, the request fails with 409 and duplicate_reference_id. It comes back on the invoice, on the payment in /v1/transactions/ and in the invoice.paid webhook. See Matching a payment to your own record.
string
The customer’s phone number.
string
URL to redirect the customer after successful payment.
datetime
Optional expiry deadline (ISO 8601), for example 2027-12-31T23:59:59Z. Must be in the future, or the invoice is created already expired: a date in the past is accepted, not rejected, and the invoice cannot be paid. The invoice counts as expired once the calendar day of expires_at has ended in India Standard Time (UTC+05:30), not at the exact moment.
object
Limit which payment methods the checkout offers. Send either enabled (only these methods) or disabled (the usual methods minus these), one at a time. Omit it, or send null, to offer the usual methods. See Payment Methods.
Show properties
string[]
Payment method identifiers to offer, for example ["card", "klarna"].
string[]
Payment method identifiers to hide, for example ["crypto"]. Disabling card also hides Apple Pay and Google Pay.
A reference_id can be used on one invoice only. If you create an invoice with one you already used, the API returns 409 with the code duplicate_reference_id, and details.invoice_id is the id of the existing invoice (see the 409 example below). There are no exceptions: a paid, expired or voided invoice keeps its reference, so a new invoice for the same booking needs a different reference_id.An Idempotency-Key still works. With the key, a retried create returns the original invoice. Without it, a retry of a create that has a reference_id gets the 409. An invoice without a reference_id is not limited, so only an Idempotency-Key stops a duplicate there. Send one. See the Idempotency guide.
Matching a payment to your own record
Create one invoice per booking or order, and pass your own id as reference_id.
Store the id of the invoice that comes back, next to your record.
When the invoice.paid webhook arrives, find your record by its reference_id, or by invoice_id, which is the id you stored.
If a create returns duplicate_reference_id, an invoice for that record already exists. Fetch it with GET /v1/invoices/{id}/, using details.invoice_id, and reuse its checkout_url if it is not paid or expired.
Response
Returns the created invoice with a checkout_url to send to the customer.
uuid
The unique identifier for the invoice.
string
Auto-generated invoice number.
string | null
Your own id for this invoice, as you sent it when you created the invoice. null if none was set.
integer
The invoiced amount in cents (smallest currency unit).
string
The payment URL to send to the customer.
boolean
false - invoices are unpaid on creation.
boolean
false unless the calendar day of expires_at has already passed. It is true straight away if you sent a past expires_at.
datetime
The expiry deadline, if provided.
object | null
The saved payment method setting, for example {"enabled": ["card"]}. null means the usual methods. See Payment Methods.
{ "error": { "type": "invalid_request_error", "code": "validation_error", "message": "One or more fields are invalid.", "details": { "customer_name": ["This field is required."], "customer_email": ["Enter a valid email address."] } }}
{ "error": { "type": "invalid_request_error", "code": "validation_error", "message": "One or more fields are invalid.", "details": { "line_items": ["At most 50 line items."] } }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Playto Pay Docs","colors":{"primary":"#000000","light":"#555555","dark":"#000000"},"logo":{"light":"/logo/logo.png","dark":"/logo/logo.png"},"favicon":"/logo/logo.png","api":{"mdx":{"auth":{"method":"key","name":"X-API-KEY"},"server":["https://api.playto.so/v1","https://sandbox-api.playto.so/v1"]}},"navbar":{"links":[{"href":"mailto:support@playto.so","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.playto.so"}},"footer":{"socials":{"twitter":"https://twitter.com/playto_so","github":"https://github.com/playto-org"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4344"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false,"isLoggedInCli":false},"customCss":[{"filePath":"custom.css","content":"header a img,.h-8.w-auto,img[src*=\"logo.png\"]{height:52px!important;max-height:52px!important;width:auto!important;margin-top:-2px}header{height:80px!important}@media (max-width: 640px){header a img,.h-8.w-auto,img[src*=\"logo.png\"]{height:38px!important;max-height:38px!important}header{height:64px!important}}"}]}
{"page":{"pagePath":"api-reference/invoices/create","slug":"/api-reference/invoices/create","pageMetadata":{"title":"Create Invoice","description":"Create a one-time payment request for a specific customer.","api":"POST /invoices/","href":"/api-reference/invoices/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create a one-time payment request for a specific customer.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Requires `,_jsx(_components.code,{children:`X-API-KEY`}),` header.`]}),`\n`,_jsxs(_components.p,{children:[`You can also pass an optional `,_jsx(_components.code,{children:`Idempotency-Key`}),` header to safely retry requests without creating duplicate records. See the `,_jsx(_components.a,{href:`/api-reference/idempotency`,children:`Idempotency guide`}),` for details.`]}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`title`,type:`string`,required:true,id:`param-title`,children:_jsx(_components.p,{children:`The invoice title shown to the customer.`})}),`\n`,_jsx(ParamField,{body:`amount`,type:`integer`,id:`param-amount`,children:_jsxs(_components.p,{children:[`The invoiced amount, as a whole number in cents (smallest currency unit). For example, `,_jsx(_components.code,{children:`120000`}),` is $1,200.00. Do not send decimals. Required unless you send `,_jsx(_components.code,{children:`line_items`}),`; if you send both, the total of the line items is used and `,_jsx(_components.code,{children:`amount`}),` is ignored.`]})}),`\n`,_jsxs(ParamField,{body:`line_items`,type:`object[]`,id:`param-line-items`,children:[_jsxs(_components.p,{children:[`Priced lines for the invoice. The invoice amount is the total of the lines (`,_jsx(_components.code,{children:`quantity`}),` times `,_jsx(_components.code,{children:`unit_price_cents`}),`, summed). `,_jsx(_components.strong,{children:`An invoice can have at most 50 line items`}),`; a request with more is rejected (see the `,_jsx(_components.code,{children:`400`}),` example below).`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`title`,type:`string`,required:true,id:`param-title-1`,children:_jsx(_components.p,{children:`What the line is for. Up to 255 characters.`})}),_jsx(ParamField,{body:`unit_price_cents`,type:`integer`,required:true,id:`param-unit-price-cents`,children:_jsxs(_components.p,{children:[`The price of one unit, as a whole number in cents. At least `,_jsx(_components.code,{children:`1`}),`.`]})}),_jsx(ParamField,{body:`quantity`,type:`string`,default:`1`,id:`param-quantity`,children:_jsxs(_components.p,{children:[`How many units, with up to two decimal places, for example `,_jsx(_components.code,{children:`\"2\"`}),` or `,_jsx(_components.code,{children:`\"1.5\"`}),`. At least `,_jsx(_components.code,{children:`0.01`}),`.`]})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Optional note for the line. Up to 1000 characters.`})}),_jsx(ParamField,{body:`unit`,type:`string`,id:`param-unit`,children:_jsxs(_components.p,{children:[`Optional unit label, for example `,_jsx(_components.code,{children:`hours`}),`. Up to 40 characters.`]})})]})]}),`\n`,_jsx(ParamField,{body:`customer_name`,type:`string`,required:true,id:`param-customer-name`,children:_jsx(_components.p,{children:`The customer’s full name.`})}),`\n`,_jsx(ParamField,{body:`customer_email`,type:`email`,required:true,id:`param-customer-email`,children:_jsx(_components.p,{children:`The customer’s email address.`})}),`\n`,_jsx(ParamField,{body:`currency`,type:`string`,default:`USD`,id:`param-currency`,children:_jsxs(_components.p,{children:[`Must be `,_jsx(_components.code,{children:`USD`}),`. Only USD payments are supported.`]})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description-1`,children:_jsx(_components.p,{children:`Optional description or notes for the invoice.`})}),`\n`,_jsx(ParamField,{body:`reference_id`,type:`string`,id:`param-reference-id`,children:_jsxs(_components.p,{children:[`Your own id for this invoice, for example a booking or order id. Up to 255 characters; surrounding whitespace is trimmed. Blank or `,_jsx(_components.code,{children:`null`}),` means none, and invoices without one are not limited. It must be unique among your invoices: if you already used it on another invoice, the request fails with `,_jsx(_components.code,{children:`409`}),` and `,_jsx(_components.code,{children:`duplicate_reference_id`}),`. It comes back on the invoice, on the payment in `,_jsx(_components.a,{href:`/api-reference/transactions/list`,children:_jsx(_components.code,{children:`/v1/transactions/`})}),` and in the `,_jsxs(_components.a,{href:`/api-reference/webhooks/overview`,children:[_jsx(_components.code,{children:`invoice.paid`}),` webhook`]}),`. See `,_jsx(_components.a,{href:`#matching-a-payment-to-your-own-record`,children:`Matching a payment to your own record`}),`.`]})}),`\n`,_jsx(ParamField,{body:`customer_phone`,type:`string`,id:`param-customer-phone`,children:_jsx(_components.p,{children:`The customer’s phone number.`})}),`\n`,_jsx(ParamField,{body:`redirect_url`,type:`string`,id:`param-redirect-url`,children:_jsx(_components.p,{children:`URL to redirect the customer after successful payment.`})}),`\n`,_jsx(ParamField,{body:`expires_at`,type:`datetime`,id:`param-expires-at`,children:_jsxs(_components.p,{children:[`Optional expiry deadline (ISO 8601), for example `,_jsx(_components.code,{children:`2027-12-31T23:59:59Z`}),`. Must be in the future, or the invoice is created already expired: a date in the past is accepted, not rejected, and the invoice cannot be paid. The invoice counts as expired once the calendar day of `,_jsx(_components.code,{children:`expires_at`}),` has ended in India Standard Time (UTC+05:30), not at the exact moment.`]})}),`\n`,_jsxs(ParamField,{body:`payment_method_configuration`,type:`object`,id:`param-payment-method-configuration`,children:[_jsxs(_components.p,{children:[`Limit which payment methods the checkout offers. Send either `,_jsx(_components.code,{children:`enabled`}),` (only these methods) or `,_jsx(_components.code,{children:`disabled`}),` (the usual methods minus these), one at a time. Omit it, or send `,_jsx(_components.code,{children:`null`}),`, to offer the usual methods. See `,_jsx(_components.a,{href:`/api-reference/payment-methods`,children:`Payment Methods`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`enabled`,type:`string[]`,id:`param-enabled`,children:_jsxs(_components.p,{children:[`Payment method identifiers to offer, for example `,_jsx(_components.code,{children:`[\"card\", \"klarna\"]`}),`.`]})}),_jsx(ParamField,{body:`disabled`,type:`string[]`,id:`param-disabled`,children:_jsxs(_components.p,{children:[`Payment method identifiers to hide, for example `,_jsx(_components.code,{children:`[\"crypto\"]`}),`. Disabling `,_jsx(_components.code,{children:`card`}),` also hides Apple Pay and Google Pay.`]})})]})]}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`reference_id`}),` can be used on one invoice only. If you create an invoice with one you already used, the API returns `,_jsx(_components.code,{children:`409`}),` with the code `,_jsx(_components.code,{children:`duplicate_reference_id`}),`, and `,_jsx(_components.code,{children:`details.invoice_id`}),` is the `,_jsx(_components.code,{children:`id`}),` of the existing invoice (see the `,_jsx(_components.code,{children:`409`}),` example below). There are no exceptions: a paid, expired or voided invoice keeps its reference, so a new invoice for the same booking needs a different `,_jsx(_components.code,{children:`reference_id`}),`.`]}),_jsxs(_components.p,{children:[`An `,_jsx(_components.code,{children:`Idempotency-Key`}),` still works. With the key, a retried create returns the original invoice. Without it, a retry of a create that has a `,_jsx(_components.code,{children:`reference_id`}),` gets the `,_jsx(_components.code,{children:`409`}),`. An invoice without a `,_jsx(_components.code,{children:`reference_id`}),` is not limited, so only an `,_jsx(_components.code,{children:`Idempotency-Key`}),` stops a duplicate there. Send one. See the `,_jsx(_components.a,{href:`/api-reference/idempotency`,children:`Idempotency guide`}),`.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`matching-a-payment-to-your-own-record`,children:`Matching a payment to your own record`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Create one invoice per booking or order, and pass your own id as `,_jsx(_components.code,{children:`reference_id`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Store the `,_jsx(_components.code,{children:`id`}),` of the invoice that comes back, next to your record.`]}),`\n`,_jsxs(_components.li,{children:[`When the `,_jsx(_components.code,{children:`invoice.paid`}),` webhook arrives, find your record by its `,_jsx(_components.code,{children:`reference_id`}),`, or by `,_jsx(_components.code,{children:`invoice_id`}),`, which is the `,_jsx(_components.code,{children:`id`}),` you stored.`]}),`\n`,_jsxs(_components.li,{children:[`If a create returns `,_jsx(_components.code,{children:`duplicate_reference_id`}),`, an invoice for that record already exists. Fetch it with `,_jsx(_components.code,{children:`GET /v1/invoices/{id}/`}),`, using `,_jsx(_components.code,{children:`details.invoice_id`}),`, and reuse its `,_jsx(_components.code,{children:`checkout_url`}),` if it is not paid or expired.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns the created invoice with a `,_jsx(_components.code,{children:`checkout_url`}),` to send to the customer.`]}),`\n`,_jsx(ResponseField,{name:`id`,type:`uuid`,id:`param-id`,children:_jsx(_components.p,{children:`The unique identifier for the invoice.`})}),`\n`,_jsx(ResponseField,{name:`invoice_number`,type:`string`,id:`param-invoice-number`,children:_jsx(_components.p,{children:`Auto-generated invoice number.`})}),`\n`,_jsx(ResponseField,{name:`reference_id`,type:`string | null`,id:`param-reference-id-1`,children:_jsxs(_components.p,{children:[`Your own id for this invoice, as you sent it when you created the invoice. `,_jsx(_components.code,{children:`null`}),` if none was set.`]})}),`\n`,_jsx(ResponseField,{name:`amount`,type:`integer`,id:`param-amount-1`,children:_jsx(_components.p,{children:`The invoiced amount in cents (smallest currency unit).`})}),`\n`,_jsx(ResponseField,{name:`checkout_url`,type:`string`,id:`param-checkout-url`,children:_jsx(_components.p,{children:`The payment URL to send to the customer.`})}),`\n`,_jsx(ResponseField,{name:`is_paid`,type:`boolean`,id:`param-is-paid`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`false`}),` - invoices are unpaid on creation.`]})}),`\n`,_jsx(ResponseField,{name:`is_expired`,type:`boolean`,id:`param-is-expired`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`false`}),` unless the calendar day of `,_jsx(_components.code,{children:`expires_at`}),` has already passed. It is `,_jsx(_components.code,{children:`true`}),` straight away if you sent a past `,_jsx(_components.code,{children:`expires_at`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`expires_at`,type:`datetime`,id:`param-expires-at-1`,children:_jsx(_components.p,{children:`The expiry deadline, if provided.`})}),`\n`,_jsx(ResponseField,{name:`payment_method_configuration`,type:`object | null`,id:`param-payment-method-configuration-1`,children:_jsxs(_components.p,{children:[`The saved payment method setting, for example `,_jsx(_components.code,{children:`{\"enabled\": [\"card\"]}`}),`. `,_jsx(_components.code,{children:`null`}),` means the usual methods. See `,_jsx(_components.a,{href:`/api-reference/payment-methods`,children:`Payment Methods`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`datetime`,id:`param-created-at`,children:_jsx(_components.p,{children:`Timestamp when the invoice was created.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Invoice","description":"Create a one-time payment request for a specific customer.","api":"POST /invoices/","href":"/api-reference/invoices/create"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Requires `,_jsx(_components.code,{children:`X-API-KEY`}),` header.`]}),`\n`,_jsxs(_components.p,{children:[`You can also pass an optional `,_jsx(_components.code,{children:`Idempotency-Key`}),` header to safely retry requests without creating duplicate records. See the `,_jsx(_components.a,{href:`/api-reference/idempotency`,children:`Idempotency guide`}),` for details.`]}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`title`,type:`string`,required:true,id:`param-title`,children:_jsx(_components.p,{children:`The invoice title shown to the customer.`})}),`\n`,_jsx(ParamField,{body:`amount`,type:`integer`,id:`param-amount`,children:_jsxs(_components.p,{children:[`The invoiced amount, as a whole number in cents (smallest currency unit). For example, `,_jsx(_components.code,{children:`120000`}),` is $1,200.00. Do not send decimals. Required unless you send `,_jsx(_components.code,{children:`line_items`}),`; if you send both, the total of the line items is used and `,_jsx(_components.code,{children:`amount`}),` is ignored.`]})}),`\n`,_jsxs(ParamField,{body:`line_items`,type:`object[]`,id:`param-line-items`,children:[_jsxs(_components.p,{children:[`Priced lines for the invoice. The invoice amount is the total of the lines (`,_jsx(_components.code,{children:`quantity`}),` times `,_jsx(_components.code,{children:`unit_price_cents`}),`, summed). `,_jsx(_components.strong,{children:`An invoice can have at most 50 line items`}),`; a request with more is rejected (see the `,_jsx(_components.code,{children:`400`}),` example below).`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`title`,type:`string`,required:true,id:`param-title-1`,children:_jsx(_components.p,{children:`What the line is for. Up to 255 characters.`})}),_jsx(ParamField,{body:`unit_price_cents`,type:`integer`,required:true,id:`param-unit-price-cents`,children:_jsxs(_components.p,{children:[`The price of one unit, as a whole number in cents. At least `,_jsx(_components.code,{children:`1`}),`.`]})}),_jsx(ParamField,{body:`quantity`,type:`string`,default:`1`,id:`param-quantity`,children:_jsxs(_components.p,{children:[`How many units, with up to two decimal places, for example `,_jsx(_components.code,{children:`\"2\"`}),` or `,_jsx(_components.code,{children:`\"1.5\"`}),`. At least `,_jsx(_components.code,{children:`0.01`}),`.`]})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Optional note for the line. Up to 1000 characters.`})}),_jsx(ParamField,{body:`unit`,type:`string`,id:`param-unit`,children:_jsxs(_components.p,{children:[`Optional unit label, for example `,_jsx(_components.code,{children:`hours`}),`. Up to 40 characters.`]})})]})]}),`\n`,_jsx(ParamField,{body:`customer_name`,type:`string`,required:true,id:`param-customer-name`,children:_jsx(_components.p,{children:`The customer’s full name.`})}),`\n`,_jsx(ParamField,{body:`customer_email`,type:`email`,required:true,id:`param-customer-email`,children:_jsx(_components.p,{children:`The customer’s email address.`})}),`\n`,_jsx(ParamField,{body:`currency`,type:`string`,default:`USD`,id:`param-currency`,children:_jsxs(_components.p,{children:[`Must be `,_jsx(_components.code,{children:`USD`}),`. Only USD payments are supported.`]})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description-1`,children:_jsx(_components.p,{children:`Optional description or notes for the invoice.`})}),`\n`,_jsx(ParamField,{body:`reference_id`,type:`string`,id:`param-reference-id`,children:_jsxs(_components.p,{children:[`Your own id for this invoice, for example a booking or order id. Up to 255 characters; surrounding whitespace is trimmed. Blank or `,_jsx(_components.code,{children:`null`}),` means none, and invoices without one are not limited. It must be unique among your invoices: if you already used it on another invoice, the request fails with `,_jsx(_components.code,{children:`409`}),` and `,_jsx(_components.code,{children:`duplicate_reference_id`}),`. It comes back on the invoice, on the payment in `,_jsx(_components.a,{href:`/api-reference/transactions/list`,children:_jsx(_components.code,{children:`/v1/transactions/`})}),` and in the `,_jsxs(_components.a,{href:`/api-reference/webhooks/overview`,children:[_jsx(_components.code,{children:`invoice.paid`}),` webhook`]}),`. See `,_jsx(_components.a,{href:`#matching-a-payment-to-your-own-record`,children:`Matching a payment to your own record`}),`.`]})}),`\n`,_jsx(ParamField,{body:`customer_phone`,type:`string`,id:`param-customer-phone`,children:_jsx(_components.p,{children:`The customer’s phone number.`})}),`\n`,_jsx(ParamField,{body:`redirect_url`,type:`string`,id:`param-redirect-url`,children:_jsx(_components.p,{children:`URL to redirect the customer after successful payment.`})}),`\n`,_jsx(ParamField,{body:`expires_at`,type:`datetime`,id:`param-expires-at`,children:_jsxs(_components.p,{children:[`Optional expiry deadline (ISO 8601), for example `,_jsx(_components.code,{children:`2027-12-31T23:59:59Z`}),`. Must be in the future, or the invoice is created already expired: a date in the past is accepted, not rejected, and the invoice cannot be paid. The invoice counts as expired once the calendar day of `,_jsx(_components.code,{children:`expires_at`}),` has ended in India Standard Time (UTC+05:30), not at the exact moment.`]})}),`\n`,_jsxs(ParamField,{body:`payment_method_configuration`,type:`object`,id:`param-payment-method-configuration`,children:[_jsxs(_components.p,{children:[`Limit which payment methods the checkout offers. Send either `,_jsx(_components.code,{children:`enabled`}),` (only these methods) or `,_jsx(_components.code,{children:`disabled`}),` (the usual methods minus these), one at a time. Omit it, or send `,_jsx(_components.code,{children:`null`}),`, to offer the usual methods. See `,_jsx(_components.a,{href:`/api-reference/payment-methods`,children:`Payment Methods`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`enabled`,type:`string[]`,id:`param-enabled`,children:_jsxs(_components.p,{children:[`Payment method identifiers to offer, for example `,_jsx(_components.code,{children:`[\"card\", \"klarna\"]`}),`.`]})}),_jsx(ParamField,{body:`disabled`,type:`string[]`,id:`param-disabled`,children:_jsxs(_components.p,{children:[`Payment method identifiers to hide, for example `,_jsx(_components.code,{children:`[\"crypto\"]`}),`. Disabling `,_jsx(_components.code,{children:`card`}),` also hides Apple Pay and Google Pay.`]})})]})]}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`reference_id`}),` can be used on one invoice only. If you create an invoice with one you already used, the API returns `,_jsx(_components.code,{children:`409`}),` with the code `,_jsx(_components.code,{children:`duplicate_reference_id`}),`, and `,_jsx(_components.code,{children:`details.invoice_id`}),` is the `,_jsx(_components.code,{children:`id`}),` of the existing invoice (see the `,_jsx(_components.code,{children:`409`}),` example below). There are no exceptions: a paid, expired or voided invoice keeps its reference, so a new invoice for the same booking needs a different `,_jsx(_components.code,{children:`reference_id`}),`.`]}),_jsxs(_components.p,{children:[`An `,_jsx(_components.code,{children:`Idempotency-Key`}),` still works. With the key, a retried create returns the original invoice. Without it, a retry of a create that has a `,_jsx(_components.code,{children:`reference_id`}),` gets the `,_jsx(_components.code,{children:`409`}),`. An invoice without a `,_jsx(_components.code,{children:`reference_id`}),` is not limited, so only an `,_jsx(_components.code,{children:`Idempotency-Key`}),` stops a duplicate there. Send one. See the `,_jsx(_components.a,{href:`/api-reference/idempotency`,children:`Idempotency guide`}),`.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`matching-a-payment-to-your-own-record`,children:`Matching a payment to your own record`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Create one invoice per booking or order, and pass your own id as `,_jsx(_components.code,{children:`reference_id`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Store the `,_jsx(_components.code,{children:`id`}),` of the invoice that comes back, next to your record.`]}),`\n`,_jsxs(_components.li,{children:[`When the `,_jsx(_components.code,{children:`invoice.paid`}),` webhook arrives, find your record by its `,_jsx(_components.code,{children:`reference_id`}),`, or by `,_jsx(_components.code,{children:`invoice_id`}),`, which is the `,_jsx(_components.code,{children:`id`}),` you stored.`]}),`\n`,_jsxs(_components.li,{children:[`If a create returns `,_jsx(_components.code,{children:`duplicate_reference_id`}),`, an invoice for that record already exists. Fetch it with `,_jsx(_components.code,{children:`GET /v1/invoices/{id}/`}),`, using `,_jsx(_components.code,{children:`details.invoice_id`}),`, and reuse its `,_jsx(_components.code,{children:`checkout_url`}),` if it is not paid or expired.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns the created invoice with a `,_jsx(_components.code,{children:`checkout_url`}),` to send to the customer.`]}),`\n`,_jsx(ResponseField,{name:`id`,type:`uuid`,id:`param-id`,children:_jsx(_components.p,{children:`The unique identifier for the invoice.`})}),`\n`,_jsx(ResponseField,{name:`invoice_number`,type:`string`,id:`param-invoice-number`,children:_jsx(_components.p,{children:`Auto-generated invoice number.`})}),`\n`,_jsx(ResponseField,{name:`reference_id`,type:`string | null`,id:`param-reference-id-1`,children:_jsxs(_components.p,{children:[`Your own id for this invoice, as you sent it when you created the invoice. `,_jsx(_components.code,{children:`null`}),` if none was set.`]})}),`\n`,_jsx(ResponseField,{name:`amount`,type:`integer`,id:`param-amount-1`,children:_jsx(_components.p,{children:`The invoiced amount in cents (smallest currency unit).`})}),`\n`,_jsx(ResponseField,{name:`checkout_url`,type:`string`,id:`param-checkout-url`,children:_jsx(_components.p,{children:`The payment URL to send to the customer.`})}),`\n`,_jsx(ResponseField,{name:`is_paid`,type:`boolean`,id:`param-is-paid`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`false`}),` - invoices are unpaid on creation.`]})}),`\n`,_jsx(ResponseField,{name:`is_expired`,type:`boolean`,id:`param-is-expired`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`false`}),` unless the calendar day of `,_jsx(_components.code,{children:`expires_at`}),` has already passed. It is `,_jsx(_components.code,{children:`true`}),` straight away if you sent a past `,_jsx(_components.code,{children:`expires_at`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`expires_at`,type:`datetime`,id:`param-expires-at-1`,children:_jsx(_components.p,{children:`The expiry deadline, if provided.`})}),`\n`,_jsx(ResponseField,{name:`payment_method_configuration`,type:`object | null`,id:`param-payment-method-configuration-1`,children:_jsxs(_components.p,{children:[`The saved payment method setting, for example `,_jsx(_components.code,{children:`{\"enabled\": [\"card\"]}`}),`. `,_jsx(_components.code,{children:`null`}),` means the usual methods. See `,_jsx(_components.a,{href:`/api-reference/payment-methods`,children:`Payment Methods`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`datetime`,id:`param-created-at`,children:_jsx(_components.p,{children:`Timestamp when the invoice was created.`})}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`16`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.playto.so/v1/invoices/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-KEY: sk_live_your_api_key_here\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"title\": \"Website Redesign - Phase 1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Wireframes and initial mockups.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reference_id\": \"booking_88213\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 120000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer_name\": \"Jane Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer_email\": \"jane@acme.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer_phone\": \"+1 555 000 1234\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"redirect_url\": \"https://yoursite.com/thank-you\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expires_at\": \"2027-12-31T23:59:59Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_method_configuration\": { \"disabled\": [\"crypto\"] }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`201`,numberOfLines:`20`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"c3d4e5f6-a7b8-9012-cdef-123456789012\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invoice_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"INV-20240501-C3D4E5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reference_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"booking_88213\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Website Redesign - Phase 1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Wireframes and initial mockups.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Jane Smith\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jane@acme.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+1 555 000 1234\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"checkout_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.playto.so/pay/checkout?paymentLinkId=c3d4e5f6-a7b8-9012-cdef-123456789012\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"redirect_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://yoursite.com/thank-you\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_paid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_expired\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"paid_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2027-12-31T23:59:59Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_method_configuration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"disabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"crypto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-05-01T10:00:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400 (validation error)`,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_request_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"validation_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"One or more fields are invalid.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This field is required.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Enter a valid email address.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400 (more than 50 line items)`,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_request_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"validation_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"One or more fields are invalid.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"line_items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"At most 50 line items.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`409 (reference_id already used)`,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"conflict_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"duplicate_reference_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An invoice with this reference_id already exists.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invoice_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"c3d4e5f6-a7b8-9012-cdef-123456789012\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Invoice","description":"Create a one-time payment request for a specific customer.","api":"POST /invoices/","href":"/api-reference/invoices/create"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":3,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]},{"title":"Matching a payment to your own record","slug":"matching-a-payment-to-your-own-record","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.playto.so/v1/invoices/\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-API-KEY: sk_live_your_api_key_here\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"title\": \"Website Redesign - Phase 1\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Wireframes and initial mockups.\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"reference_id\": \"booking_88213\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"amount\": 120000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"currency\": \"USD\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer_name\": \"Jane Smith\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer_email\": \"jane@acme.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer_phone\": \"+1 555 000 1234\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"redirect_url\": \"https://yoursite.com/thank-you\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"expires_at\": \"2027-12-31T23:59:59Z\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"payment_method_configuration\": { \"disabled\": [\"crypto\"] }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"201","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"20\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"c3d4e5f6-a7b8-9012-cdef-123456789012\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"invoice_number\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"INV-20240501-C3D4E5\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"reference_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"booking_88213\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"title\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Website Redesign - Phase 1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"description\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Wireframes and initial mockups.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">120000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"USD\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customer_name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Jane Smith\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customer_email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"jane@acme.com\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customer_phone\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"+1 555 000 1234\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"checkout_url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://app.playto.so/pay/checkout?paymentLinkId=c3d4e5f6-a7b8-9012-cdef-123456789012\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"redirect_url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://yoursite.com/thank-you\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"is_paid\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"is_expired\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"paid_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2027-12-31T23:59:59Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"payment_method_configuration\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"disabled\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"crypto\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2024-05-01T10:00:00Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400 (validation error)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"invalid_request_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"validation_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"One or more fields are invalid.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"details\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customer_name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"This field is required.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customer_email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Enter a valid email address.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400 (more than 50 line items)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"invalid_request_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"validation_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"One or more fields are invalid.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"details\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"line_items\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"At most 50 line items.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"409 (reference_id already used)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"conflict_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"duplicate_reference_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"An invoice with this reference_id already exists.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"details\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"invoice_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"c3d4e5f6-a7b8-9012-cdef-123456789012\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create Invoice","path":"/invoices/","servers":[{"url":"https://api.playto.so/v1"},{"url":"https://sandbox-api.playto.so/v1"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"X-API-KEY":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"title":[{"type":"string","description":"The invoice title shown to the customer.","required":true}],"amount":[{"type":"integer","description":"The invoiced amount, as a whole number in cents (smallest currency unit). For example, `120000` is $1,200.00. Do not send decimals. Required unless you send `line_items` ; if you send both, the total of the line items is used and `amount` is ignored."}],"line_items":[{"type":"array","items":[{"type":"object","properties":{"title":[{"type":"string","description":"What the line is for. Up to 255 characters.","required":true}],"unit_price_cents":[{"type":"integer","description":"The price of one unit, as a whole number in cents. At least `1` .","required":true}],"quantity":[{"type":"string","description":"How many units, with up to two decimal places, for example `\"2\"` or `\"1.5\"` . At least `0.01` ."}],"description":[{"type":"string","description":"Optional note for the line. Up to 1000 characters."}],"unit":[{"type":"string","description":"Optional unit label, for example `hours` . Up to 40 characters."}]}}],"description":"Priced lines for the invoice. The invoice amount is the total of the lines ( `quantity` times `unit_price_cents` , summed). An invoice can have at most 50 line items ; a request with more is rejected (see the `400` example below)."}],"customer_name":[{"type":"string","description":"The customer’s full name.","required":true}],"customer_email":[{"type":"object","properties":{},"description":"The customer’s email address.","required":true}],"currency":[{"type":"string","description":"Must be `USD` . Only USD payments are supported."}],"description":[{"type":"string","description":"Optional description or notes for the invoice."}],"reference_id":[{"type":"string","description":"Your own id for this invoice, for example a booking or order id. Up to 255 characters; surrounding whitespace is trimmed. Blank or `null` means none, and invoices without one are not limited. It must be unique among your invoices: if you already used it on another invoice, the request fails with `409` and `duplicate_reference_id` . It comes back on the invoice, on the payment in `/v1/transactions/` and in the `invoice.paid` webhook . See Matching a payment to your own record ."}],"customer_phone":[{"type":"string","description":"The customer’s phone number."}],"redirect_url":[{"type":"string","description":"URL to redirect the customer after successful payment."}],"expires_at":[{"type":"object","properties":{},"description":"Optional expiry deadline (ISO 8601), for example `2027-12-31T23:59:59Z` . Must be in the future, or the invoice is created already expired: a date in the past is accepted, not rejected, and the invoice cannot be paid. The invoice counts as expired once the calendar day of `expires_at` has ended in India Standard Time (UTC+05:30), not at the exact moment."}],"payment_method_configuration":[{"type":"object","properties":{"enabled":[{"type":"array","items":[{"type":"string"}],"description":"Payment method identifiers to offer, for example `[\"card\", \"klarna\"]` ."}],"disabled":[{"type":"array","items":[{"type":"string"}],"description":"Payment method identifiers to hide, for example `[\"crypto\"]` . Disabling `card` also hides Apple Pay and Google Pay."}]},"description":"Limit which payment methods the checkout offers. Send either `enabled` (only these methods) or `disabled` (the usual methods minus these), one at a time. Omit it, or send `null` , to offer the usual methods. See Payment Methods ."}]}}],"examples":{"example":{"value":{"title":"\u003cstring>","amount":123,"line_items":[{"title":"\u003cstring>","unit_price_cents":123,"quantity":"\u003cstring>","description":"\u003cstring>","unit":"\u003cstring>"}],"customer_name":"\u003cstring>","customer_email":{},"currency":"\u003cstring>","description":"\u003cstring>","reference_id":"\u003cstring>","customer_phone":"\u003cstring>","redirect_url":"\u003cstring>","expires_at":{},"payment_method_configuration":{"enabled":["\u003cstring>"],"disabled":["\u003cstring>"]}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"The unique identifier for the invoice."}],"invoice_number":[{"type":"string","description":"Auto-generated invoice number."}],"reference_id":[{"type":"object","properties":{},"description":"Your own id for this invoice, as you sent it when you created the invoice. `null` if none was set."}],"amount":[{"type":"integer","description":"The invoiced amount in cents (smallest currency unit)."}],"checkout_url":[{"type":"string","description":"The payment URL to send to the customer."}],"is_paid":[{"type":"boolean","description":"`false` - invoices are unpaid on creation."}],"is_expired":[{"type":"boolean","description":"`false` unless the calendar day of `expires_at` has already passed. It is `true` straight away if you sent a past `expires_at` ."}],"expires_at":[{"type":"object","properties":{},"description":"The expiry deadline, if provided."}],"payment_method_configuration":[{"type":"object","properties":{},"description":"The saved payment method setting, for example `{\"enabled\": [\"card\"]}` . `null` means the usual methods. See Payment Methods ."}],"created_at":[{"type":"object","properties":{},"description":"Timestamp when the invoice was created."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","invoice_number":"\u003cstring>","reference_id":{},"amount":123,"checkout_url":"\u003cstring>","is_paid":true,"is_expired":true,"expires_at":{},"payment_method_configuration":{},"created_at":{}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"docs.playto.so","siteName":"Playto Pay Docs","title":"Create Invoice - Playto Pay Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"api-reference/invoices/create.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a one-time payment request for a specific customer.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Playto Pay Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/favicons/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicons/favicon-32x32.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicons/favicon-16x16.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicons/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Invoice - Playto Pay Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a one-time payment request for a specific customer.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Playto Pay Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./api-reference/invoices/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"http://docs.playto.so/_mintlify/og/api-reference/invoices/create.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Invoice - Playto Pay Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a one-time payment request for a specific customer.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"http://docs.playto.so/_mintlify/og/api-reference/invoices/create.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/favicons/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Playto Pay Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./api-reference/invoices/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/invoices/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Playto Pay Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Playto Pay Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/invoices/create.md","siteName":"Playto Pay Docs","nav":{"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/introduction"}]},{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Idempotency","href":"/api-reference/idempotency"},{"title":"Payment Methods","href":"/api-reference/payment-methods"}]},{"group":"Products","pages":[{"title":"List Products","api":"GET /products/","href":"/api-reference/products/list"},{"title":"Create Product","api":"POST /products/","href":"/api-reference/products/create"},{"title":"Retrieve Product","api":"GET /products/{id}/","href":"/api-reference/products/retrieve"},{"title":"Update Product","api":"PATCH /products/{id}/","href":"/api-reference/products/update"}]},{"group":"Invoices","pages":[{"title":"List Invoices","description":"Retrieve all one-time payment requests (invoices) for your merchant account.","api":"GET /invoices/","href":"/api-reference/invoices/list"},{"title":"Create Invoice","api":"POST /invoices/","href":"/api-reference/invoices/create"},{"title":"Retrieve Invoice","description":"Fetch details for a single invoice by its ID.","api":"GET /invoices/{id}/","href":"/api-reference/invoices/retrieve"},{"title":"Void Invoice","api":"POST /invoices/{id}/void/","href":"/api-reference/invoices/void"}]},{"group":"Subscriptions","pages":[{"title":"Subscriptions — coming soon","sidebarTitle":"Subscriptions (coming soon)","href":"/api-reference/subscriptions"}]},{"group":"Transactions","pages":[{"title":"List Payments","api":"GET /transactions/","href":"/api-reference/transactions/list"},{"title":"Retrieve Payment","api":"GET /transactions/{id}/","href":"/api-reference/transactions/retrieve"}]},{"group":"Disputes","pages":[{"title":"List Disputes","api":"GET /disputes/","href":"/api-reference/disputes/list"},{"title":"Retrieve Dispute","api":"GET /disputes/{id}/","href":"/api-reference/disputes/retrieve"}]},{"group":"Customers","pages":[{"title":"List Customers","api":"GET /customers/","href":"/api-reference/customers/list"},{"title":"Create Customer","api":"POST /customers/","href":"/api-reference/customers/create"},{"title":"Retrieve Customer","api":"GET /customers/{id}/","href":"/api-reference/customers/retrieve"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/api-reference/webhooks/overview"},{"title":"Send Test Event","api":"POST /webhooks/test/","href":"/api-reference/webhooks/test-event"}]}]}]},"basePath":"","title":"Create Invoice - Playto Pay Docs","buildId":"21f6b00fe823","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CFz0E8u5.js","snippetPresets-B711QoyC.js","utils-K5l2MKEE.js","style-to-object-BY3JEAdk.js","utils-BYeumqVI.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-BnkNWCuc.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BaiIuF4F.js","_Uint8Array-C3lkX7eq.js","isObject-FP1Yky1u.js","ApiExamples-DDr_VRty.js","usePlaygroundInputsStore-BHK-2g0i.js","shallow-B7__N5wH.js","isEqual-COF04FiJ.js","CodeSnippets-C5mlIcHd.js","CodeSnippet-BDjQs_-R.js","use-playground-group-access-ClyA6oTP.js","Page-Dyt6xTzX.js","api-description-markdown-DZxHsOOv.js","DynamicMarkdown-CbHyFERE.js","SectionHeading-CnT9KmJz.js","MethodPill-BtIoDzs7.js","getPastedJson-CgGDEBlu.js","Check2Icon-CVB6cnoK.js","axios-CsQoIw0U.js"]}