Skip to content

Commit 27d1118

Browse files
DOCS-3893:Add Credit invoice and refund feature
1 parent 127d188 commit 27d1118

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

content/payment-methods/e-invoicing.md

+44
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,51 @@ MultiSafepay can customize the formatting of your invoices on request. Email <sa
269269

270270
The invoice is sent to the email address provided.
271271

272+
**Via the API**
273+
274+
<details id="how-to-generate-an-invoice">
275+
<summary>How to generate an invoice</summary>
276+
<br>
277+
278+
1. [Create order](/reference/createorder/) > BNPL order
279+
2. [Update the <<glossary:order status>> status](/reference/updateorder) to **Shipped**. <br> You must include `invoice_id` in the request.
280+
3. After the collection flow is complete, wait for the invoice to be generated.
281+
4. Once the invoice is generated, fetch the initial invoice using the `order_id`.
282+
283+
#### Example:
284+
285+
```JSON
286+
curl --location 'https://testapi.multisafepay.com/v1/json/orders/order_id/invoice?api_key={your-test-api-key}' \
287+
288+
--header 'Cookie: PHPSESSID=0ehsns7asf0vgarhlf77d1ac17'
289+
```
290+
291+
5. In response to refund invoice request, you receive an object including a PDF encoded in `base_64`.
292+
293+
6. To convert the `base_64` to a PDF, you need to pass the `base_64` to a converter.
294+
295+
</details>
296+
297+
<details id="how-to-generate-an-credit-invoice">
298+
<summary>How to generate a refund invoice</summary>
299+
<br>
300+
301+
1. [Refund order](/reference/refundorder), you must include a unique `refund_order_id` in the request.
302+
2. To fetch the refund invoice, use the `refund_order_id`:
303+
304+
#### Example
305+
306+
```JSON
307+
curl --location 'https://testapi.multisafepay.com/v1/json/orders/refund_order_id/invoice?api_key={your-test-api-key}' \
308+
309+
--header 'Cookie: PHPSESSID=0ehsns7asf0vgarhlf77d1ac17'
310+
```
311+
3. In response to refund invoice request, you receive an object including a PDF encoded in `base_64`.
312+
313+
4. To convert the `base_64` to a PDF, you need to pass the `base_64` to a converter.
314+
272315
---
316+
</details>
273317

274318
</details>
275319

0 commit comments

Comments
 (0)