# After Payment

Post-payment management APIs

## Check Payment Status

> Check the status of a payment transaction

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"After Payment","description":"Post-payment management APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"BasicAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Basic authentication using Merchant ID and Merchant Key"}},"schemas":{"CheckStatusResponse":{"allOf":[{"$ref":"#/components/schemas/StandardResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/CustomerInfo"},"order":{"$ref":"#/components/schemas/OrderInfo"},"card":{"type":"object","properties":{"mask":{"type":"string","description":"Masked card number"},"info":{"type":"object","properties":{"brand":{"type":"string","description":"Card brand"},"issuing":{"type":"string","description":"Issuing bank"},"type":{"type":"string","description":"Card type"},"subType":{"type":"string","description":"Card subtype"},"country":{"type":"string","description":"Card country"}}}}},"meta":{"type":"object","properties":{"data":{"type":"object","nullable":true}}},"result":{"type":"object","properties":{"payment":{"type":"object","properties":{"amount":{"type":"integer","description":"Payment amount"},"status":{"type":"string","description":"Payment status"},"statusDesc":{"type":"string","nullable":true,"description":"Status description"}}}}}}}}}]},"StandardResponse":{"type":"object","properties":{"responseCode":{"type":"string","description":"Response code"},"responseMessage":{"type":"string","description":"Response message"},"processingTime":{"type":"number","description":"Processing time in seconds"}}},"CustomerInfo":{"type":"object","properties":{"id":{"type":"string","description":"Customer ID"},"email":{"type":"string","format":"email","description":"Customer email"},"firstName":{"type":"string","description":"Customer first name"},"lastName":{"type":"string","description":"Customer last name"},"mobilePhone":{"type":"string","description":"Customer mobile phone"}}},"OrderInfo":{"type":"object","properties":{"id":{"type":"string","description":"Order ID"},"amount":{"type":"string","description":"Transaction amount"},"currency":{"type":"string","description":"Currency code"},"description":{"type":"string","description":"Order description"},"item":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"unitPrice":{"type":"string"}}}}}}}},"paths":{"/pg/payment/card/check/{orderId}":{"get":{"tags":["After Payment"],"summary":"Check Payment Status","description":"Check the status of a payment transaction","operationId":"checkPaymentStatus","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"},"description":"Order ID to check status"}],"responses":{"200":{"description":"Payment status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckStatusResponse"}}}}}}}}}
```

## Refund Payment

> Refund a payment transaction

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"After Payment","description":"Post-payment management APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"BasicAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Basic authentication using Merchant ID and Merchant Key"}},"schemas":{"RefundRequest":{"type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"string","description":"Order ID"},"amount":{"type":"string","description":"Refund amount"}}}}},"RefundResponse":{"allOf":[{"$ref":"#/components/schemas/StandardResponse"}]},"StandardResponse":{"type":"object","properties":{"responseCode":{"type":"string","description":"Response code"},"responseMessage":{"type":"string","description":"Response message"},"processingTime":{"type":"number","description":"Processing time in seconds"}}}}},"paths":{"/pg/payment/card/refund":{"post":{"tags":["After Payment"],"summary":"Refund Payment","description":"Refund a payment transaction","operationId":"refundPaymentTransaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Payment refunded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundResponse"}}}}}}}}}
```

## Void Payment

> Void a payment transaction

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"After Payment","description":"Post-payment management APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"BasicAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Basic authentication using Merchant ID and Merchant Key"}},"schemas":{"VoidRequest":{"type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"string","description":"Order ID"},"amount":{"type":"string","description":"Void amount"}}}}},"VoidResponse":{"allOf":[{"$ref":"#/components/schemas/StandardResponse"}]},"StandardResponse":{"type":"object","properties":{"responseCode":{"type":"string","description":"Response code"},"responseMessage":{"type":"string","description":"Response message"},"processingTime":{"type":"number","description":"Processing time in seconds"}}}}},"paths":{"/pg/payment/card/void":{"post":{"tags":["After Payment"],"summary":"Void Payment","description":"Void a payment transaction","operationId":"voidPayment","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidRequest"}}}},"responses":{"200":{"description":"Payment voided successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidResponse"}}}}}}}}}
```

## Cancel Order

> Cancel a pending order

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"After Payment","description":"Post-payment management APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"BasicAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Basic authentication using Merchant ID and Merchant Key"}},"schemas":{"CancelResponse":{"allOf":[{"$ref":"#/components/schemas/StandardResponse"}]},"StandardResponse":{"type":"object","properties":{"responseCode":{"type":"string","description":"Response code"},"responseMessage":{"type":"string","description":"Response message"},"processingTime":{"type":"number","description":"Processing time in seconds"}}}}},"paths":{"/pg/payment/card/cancel/{orderId}":{"get":{"tags":["After Payment"],"summary":"Cancel Order","description":"Cancel a pending order","operationId":"cancelOrder","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string"},"description":"Order ID to cancel"}],"responses":{"200":{"description":"Order cancelled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://docs.finpay.id/api-reference/finpay-pg-rest-api/after-payment.md?ask=<question>
```

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

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