> For the complete documentation index, see [llms.txt](https://docs.finpay.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finpay.id/api-reference/finpay-pg-rest-api/snap-qris.md).

# SNAP QRIS

SNAP QRIS compliant APIs

## Get Access Token

> Get OAuth2 access token for SNAP API authentication

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"SNAP QRIS","description":"SNAP QRIS compliant APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/snap/oauth/v1.0/access-token/b2b","scopes":{"snap:qr:mpm:generate":"Generate QR Code","snap:qr:mpm:query":"Query Payment Status","snap:qr:mpm:refund":"Refund Payment"}}}}},"schemas":{"SnapAccessTokenRequest":{"type":"object","properties":{"grantType":{"type":"string","enum":["client_credentials"]}}},"SnapAccessTokenResponse":{"type":"object","properties":{"responseCode":{"type":"string"},"responseMessage":{"type":"string"},"accessToken":{"type":"string","description":"Access token"},"tokenType":{"type":"string"},"expiresIn":{"type":"integer"}}}}},"paths":{"/snap/oauth/v1.0/access-token/b2b":{"post":{"tags":["SNAP QRIS"],"summary":"Get Access Token","description":"Get OAuth2 access token for SNAP API authentication","operationId":"getSnapAccessToken","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapAccessTokenRequest"}}}},"responses":{"200":{"description":"Access token generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapAccessTokenResponse"}}}}}}}}}
```

## Generate QR Code

> Generate QR code for payment

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"SNAP QRIS","description":"SNAP QRIS compliant APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/snap/oauth/v1.0/access-token/b2b","scopes":{"snap:qr:mpm:generate":"Generate QR Code","snap:qr:mpm:query":"Query Payment Status","snap:qr:mpm:refund":"Refund Payment"}}}}},"schemas":{"GenerateQRCodeRequest":{"type":"object","properties":{"partnerReferenceNo":{"type":"string","description":"Partner reference number"},"amount":{"type":"object","properties":{"value":{"type":"string"},"currency":{"type":"string"}}},"FeeAmount":{"type":"object","properties":{"value":{"type":"string"},"currency":{"type":"string"}}},"merchantId":{"type":"string","description":"Merchant ID"},"subMerchantId":{"type":"string","description":"Sub-merchant ID"},"terminalId":{"type":"string","description":"Terminal ID"},"validityPeriod":{"type":"string","description":"QR code validity period"},"additionalInfo":{"type":"object","properties":{"tips_indikator":{"type":"string"},"tips_fixamount":{"type":"string"},"tips_percentage":{"type":"string"},"note":{"type":"string"},"qr_type":{"type":"string"},"callback_payment":{"type":"string"}}}}},"GenerateQRCodeResponse":{"type":"object","properties":{"responseCode":{"type":"string"},"responseMessage":{"type":"string"},"referenceNo":{"type":"string","description":"Reference number"},"partnerReferenceNo":{"type":"string","description":"Partner reference number"},"qrContent":{"type":"string","description":"QR code content"},"merchantName":{"type":"string","description":"Merchant name"},"qrUrl":{"type":"string","description":"QR code URL"},"terminalId":{"type":"string","description":"Terminal ID"},"additionalInfo":{"type":"object","properties":{"merchantId":{"type":"string"},"subMerchantId":{"type":"string"},"nmid":{"type":"string"},"validityPeriod":{"type":"string"}}}}}}},"paths":{"/pg/payment/card/v1.0/qr/qr-mpm-generate":{"post":{"tags":["SNAP QRIS"],"summary":"Generate QR Code","description":"Generate QR code for payment","operationId":"generateQRCode","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Bearer access token"},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content type of request body"},{"name":"Accept","in":"header","required":true,"schema":{"type":"string"},"description":"Accept response format"},{"name":"X-TIMESTAMP","in":"header","required":true,"schema":{"type":"string","format":"date-time"},"description":"Client's current local time in ISO 8601 format"},{"name":"X-SIGNATURE","in":"header","required":true,"schema":{"type":"string"},"description":"Request signature"},{"name":"ORIGIN","in":"header","required":true,"schema":{"type":"string"},"description":"Origin domain"},{"name":"X-EXTERNAL-ID","in":"header","required":true,"schema":{"type":"string","maxLength":32},"description":"Numeric string reference number (unique per day)"},{"name":"X-PARTNER-ID","in":"header","required":true,"schema":{"type":"string","maxLength":36},"description":"Unique partner identifier"},{"name":"CHANNEL-ID","in":"header","required":true,"schema":{"type":"string","maxLength":5},"description":"PJP's channel ID for device identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateQRCodeRequest"}}}},"responses":{"200":{"description":"QR code generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateQRCodeResponse"}}}}}}}}}
```

## Payment Notification

> Receive payment notification

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"SNAP QRIS","description":"SNAP QRIS compliant APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/snap/oauth/v1.0/access-token/b2b","scopes":{"snap:qr:mpm:generate":"Generate QR Code","snap:qr:mpm:query":"Query Payment Status","snap:qr:mpm:refund":"Refund Payment"}}}}},"schemas":{"PaymentNotifyRequest":{"type":"object","properties":{"originalPartnerReferenceNo":{"type":"string","description":"Original partner reference number"},"originalReferenceNo":{"type":"string","description":"Original reference number"},"amount":{"type":"object","properties":{"value":{"type":"string"},"currency":{"type":"string"}}},"transactionDate":{"type":"string","format":"date-time","description":"Transaction date"}}},"PaymentNotifyResponse":{"type":"object","properties":{"responseCode":{"type":"string"},"responseMessage":{"type":"string"}}}}},"paths":{"/pg/payment/card/v1.0/qr/qr-mpm-notify":{"post":{"tags":["SNAP QRIS"],"summary":"Payment Notification","description":"Receive payment notification","operationId":"paymentNotify","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Bearer access token"},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content type of request body"},{"name":"Accept","in":"header","required":true,"schema":{"type":"string"},"description":"Accept response format"},{"name":"X-TIMESTAMP","in":"header","required":true,"schema":{"type":"string","format":"date-time"},"description":"Client's current local time in ISO 8601 format"},{"name":"X-SIGNATURE","in":"header","required":true,"schema":{"type":"string"},"description":"Request signature"},{"name":"ORIGIN","in":"header","required":true,"schema":{"type":"string"},"description":"Origin domain"},{"name":"X-EXTERNAL-ID","in":"header","required":true,"schema":{"type":"string","maxLength":32},"description":"Numeric string reference number (unique per day)"},{"name":"X-PARTNER-ID","in":"header","required":true,"schema":{"type":"string","maxLength":36},"description":"Unique partner identifier"},{"name":"CHANNEL-ID","in":"header","required":true,"schema":{"type":"string","maxLength":5},"description":"PJP's channel ID for device identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentNotifyRequest"}}}},"responses":{"200":{"description":"Payment notification received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentNotifyResponse"}}}}}}}}}
```

## Query Payment Status

> Query payment status

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"SNAP QRIS","description":"SNAP QRIS compliant APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/snap/oauth/v1.0/access-token/b2b","scopes":{"snap:qr:mpm:generate":"Generate QR Code","snap:qr:mpm:query":"Query Payment Status","snap:qr:mpm:refund":"Refund Payment"}}}}},"schemas":{"QueryPaymentRequest":{"type":"object","properties":{"partnerReferenceNo":{"type":"string","description":"Partner reference number"},"originalReferenceNo":{"type":"string","description":"Original reference number"},"merchantId":{"type":"string","description":"Merchant ID"},"additionalInfo":{"type":"object","properties":{"merchantId":{"type":"string"},"subMerchantId":{"type":"string"}}}}},"QueryPaymentResponse":{"type":"object","properties":{"responseCode":{"type":"string"},"responseMessage":{"type":"string"},"referenceNo":{"type":"string","description":"Reference number"},"partnerReferenceNo":{"type":"string","description":"Partner reference number"},"amount":{"type":"object","properties":{"value":{"type":"string"},"currency":{"type":"string"}}},"transactionStatus":{"type":"string","description":"Transaction status"},"transactionDate":{"type":"string","format":"date-time","description":"Transaction date"}}}}},"paths":{"/pg/payment/card/v1.0/qr/qr-mpm-query":{"post":{"tags":["SNAP QRIS"],"summary":"Query Payment Status","description":"Query payment status","operationId":"queryPaymentStatus","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Bearer access token"},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content type of request body"},{"name":"Accept","in":"header","required":true,"schema":{"type":"string"},"description":"Accept response format"},{"name":"X-TIMESTAMP","in":"header","required":true,"schema":{"type":"string","format":"date-time"},"description":"Client's current local time in ISO 8601 format"},{"name":"X-SIGNATURE","in":"header","required":true,"schema":{"type":"string"},"description":"Request signature"},{"name":"ORIGIN","in":"header","required":true,"schema":{"type":"string"},"description":"Origin domain"},{"name":"X-EXTERNAL-ID","in":"header","required":true,"schema":{"type":"string","maxLength":32},"description":"Numeric string reference number (unique per day)"},{"name":"X-PARTNER-ID","in":"header","required":true,"schema":{"type":"string","maxLength":36},"description":"Unique partner identifier"},{"name":"CHANNEL-ID","in":"header","required":true,"schema":{"type":"string","maxLength":5},"description":"PJP's channel ID for device identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryPaymentRequest"}}}},"responses":{"200":{"description":"Payment status retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryPaymentResponse"}}}}}}}}}
```

## Refund Payment

> Refund payment

```json
{"openapi":"3.0.3","info":{"title":"Finpay Payment Gateway API","version":"1.0.0"},"tags":[{"name":"SNAP QRIS","description":"SNAP QRIS compliant APIs"}],"servers":[{"url":"https://devo.finnet.co.id","description":"Development Server"},{"url":"https://live.finnet.co.id","description":"Production Server"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/snap/oauth/v1.0/access-token/b2b","scopes":{"snap:qr:mpm:generate":"Generate QR Code","snap:qr:mpm:query":"Query Payment Status","snap:qr:mpm:refund":"Refund Payment"}}}}},"schemas":{"RefundPaymentRequest":{"type":"object","properties":{"partnerReferenceNo":{"type":"string","description":"Partner reference number for refund"},"originalPartnerReferenceNo":{"type":"string","description":"Original partner reference number"},"originalReferenceNo":{"type":"string","description":"Original reference number"},"amount":{"type":"object","properties":{"value":{"type":"string"},"currency":{"type":"string"}}},"reason":{"type":"string","description":"Refund reason"},"additionalInfo":{"type":"object","properties":{"merchantId":{"type":"string"},"subMerchantId":{"type":"string"}}}}},"RefundPaymentResponse":{"type":"object","properties":{"responseCode":{"type":"string"},"responseMessage":{"type":"string"},"referenceNo":{"type":"string","description":"Refund reference number"},"partnerReferenceNo":{"type":"string","description":"Partner reference number"},"originalPartnerReferenceNo":{"type":"string","description":"Original partner reference number"},"originalReferenceNo":{"type":"string","description":"Original reference number"},"amount":{"type":"object","properties":{"value":{"type":"string"},"currency":{"type":"string"}}},"transactionDate":{"type":"string","format":"date-time","description":"Refund date"}}}}},"paths":{"/pg/payment/card/v1.0/qr/qr-mpm-refund":{"post":{"tags":["SNAP QRIS"],"summary":"Refund Payment","description":"Refund payment","operationId":"refundPayment","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Bearer access token"},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content type of request body"},{"name":"Accept","in":"header","required":true,"schema":{"type":"string"},"description":"Accept response format"},{"name":"X-TIMESTAMP","in":"header","required":true,"schema":{"type":"string","format":"date-time"},"description":"Client's current local time in ISO 8601 format"},{"name":"X-SIGNATURE","in":"header","required":true,"schema":{"type":"string"},"description":"Request signature"},{"name":"ORIGIN","in":"header","required":true,"schema":{"type":"string"},"description":"Origin domain"},{"name":"X-EXTERNAL-ID","in":"header","required":true,"schema":{"type":"string","maxLength":32},"description":"Numeric string reference number (unique per day)"},{"name":"X-PARTNER-ID","in":"header","required":true,"schema":{"type":"string","maxLength":36},"description":"Unique partner identifier"},{"name":"CHANNEL-ID","in":"header","required":true,"schema":{"type":"string","maxLength":5},"description":"PJP's channel ID for device identification"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundPaymentRequest"}}}},"responses":{"200":{"description":"Payment refunded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundPaymentResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.finpay.id/api-reference/finpay-pg-rest-api/snap-qris.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
