> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # IssueReceipt # Package: paymentLinks # Namespace: PaymentLinkPayments # Method link: https://dev.wix.com/docs/api-reference/business-management/get-paid/payment-links/payment-link-payments/issue-receipt.md ## Permission Scopes: Manage Paylinks: SCOPE.PAYLINKS.MANAGE ## Introduction Issues a receipt for the specified payment link payment. --- ## REST API ### Schema ``` Method: issueReceipt Description: Issues a receipt for the specified payment link payment. URL: https://www.wixapis.com/payment-links/v1/payment-link-payments/{paymentLinkPaymentId}/issue-receipt Method: POST Return type: IssueReceiptResponse - name: receiptId | type: string | description: Issued receipt GUID. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_REGULAR_PAYMENT_LINK_PAYMENT_ORDER | Description: Either `ecomOrder` or `cashierOrder` must be provided in `regularPaymentLinkPayment.order`. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_PAYMENT_DETAILS | Description: Either `regularPaymentLinkPayment` or `giftCardPaymentLinkPayment` must be provided. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_PAYMENT_TYPE | Description: Payment type isn't valid for issuing a receipt. HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: RECEIPT_NOT_FOUND | Description: Couldn't find the receipt. ``` ### Examples ### Issue Receipt Issues a Receipt for specified payment link payment. ```curl curl -X POST \ 'https://www.wixapis.com/payment-links/v1/payment-link-payments/afb2f6c0-e497-4c69-9ddb-be8c82351456/issue-receipt' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ --data-binary '{ "paymentLinkPaymentId": "afb2f6c0-e497-4c69-9ddb-be8c82351456" }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.paymentLinks.PaymentLinkPayments.issueReceipt(paymentLinkPaymentId) Description: Issues a receipt for the specified payment link payment. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: paymentLinkPaymentId Method parameters: param name: paymentLinkPaymentId | type: string | description: Payment link payment GUID. | required: true Return type: PROMISE - name: receiptId | type: string | description: Issued receipt GUID. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_REGULAR_PAYMENT_LINK_PAYMENT_ORDER | Description: Either `ecomOrder` or `cashierOrder` must be provided in `regularPaymentLinkPayment.order`. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_PAYMENT_DETAILS | Description: Either `regularPaymentLinkPayment` or `giftCardPaymentLinkPayment` must be provided. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_PAYMENT_TYPE | Description: Payment type isn't valid for issuing a receipt. HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: RECEIPT_NOT_FOUND | Description: Couldn't find the receipt. ``` ### Examples ### issueReceipt ```javascript import { paymentLinkPayments } from '@wix/get-paid'; async function issueReceipt(paymentLinkPaymentId) { const response = await paymentLinkPayments.issueReceipt(paymentLinkPaymentId); }; ``` ### issueReceipt (with elevated permissions) ```javascript import { paymentLinkPayments } from '@wix/get-paid'; import { auth } from '@wix/essentials'; async function myIssueReceiptMethod(paymentLinkPaymentId) { const elevatedIssueReceipt = auth.elevate(paymentLinkPayments.issueReceipt); const response = await elevatedIssueReceipt(paymentLinkPaymentId); } ``` ### issueReceipt (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { paymentLinkPayments } from '@wix/get-paid'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { paymentLinkPayments }, // Include the auth strategy and host as relevant }); async function issueReceipt(paymentLinkPaymentId) { const response = await myWixClient.paymentLinkPayments.issueReceipt(paymentLinkPaymentId); }; ``` ---