> For the complete documentation index, see [llms.txt](https://paytree.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paytree.gitbook.io/api/api-methods/payments.md).

# Payments

Payment objects represent your customer's payment transactions. You can use them in conjunction with Payment Intents to process payments, or store them on Customer objects to retain transaction details and track any future changes, such as status updates.

### Get all payments

This method retrieves a list of all payment transactions, including those that are completed, failed, or still in the post-initiation stage, providing an overview of all payment statuses.

## GET /v1/transaction/payment/

>

```json
{"openapi":"3.0.3","info":{"title":"Secured Checkout API","version":"1.0.0"},"security":[{"tokenAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PaginatedPaymentList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}}}},"Payment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,2})?$"},"currency":{"type":"string","readOnly":true},"base_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,2})?$"},"base_currency":{"type":"string","readOnly":true},"fee":{"type":"string","readOnly":true},"refunded":{"type":"string","format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,2})?$"},"status":{"$ref":"#/components/schemas/StatusEnum"},"refund":{"type":"array","items":{"$ref":"#/components/schemas/Refund"},"readOnly":true},"created":{"type":"string","format":"date-time","readOnly":true}},"required":["amount","base_currency","created","currency","fee","id","refund"]},"StatusEnum":{"enum":["pending","partial","success","failed","canceled","expired","authorized","refunded","partial_refunded","disputed","disputed_won","disputed_lost","disputed_close"],"type":"string","description":"* `pending` - Pending\n* `partial` - Partially Paid\n* `success` - Success\n* `failed` - Failed\n* `canceled` - Canceled\n* `expired` - Expired\n* `authorized` - Authorized\n* `refunded` - Refunded\n* `partial_refunded` - Partially Refunded\n* `disputed` - Disputed\n* `disputed_won` - Disputed - Won\n* `disputed_lost` - Disputed - Lost\n* `disputed_close` - Disputed - Closed"},"Refund":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,2})?$"},"currency":{"type":"string","readOnly":true},"payment":{"type":"string","format":"uuid"},"gateway_id":{"type":"string","maxLength":255},"created":{"type":"string","format":"date-time","readOnly":true}},"required":["amount","created","currency","gateway_id","id","payment"]}}},"paths":{"/v1/transaction/payment/":{"get":{"operationId":"transaction_payment_list","parameters":[{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}}],"tags":["transaction"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPaymentList"}}},"description":""}}}}}}
```

### Get payment

This method fetches detailed information about a specific payment transaction using its unique identifier, allowing you to retrieve the current status, amount, and other relevant details for that payment.

## GET /v1/transaction/payment/{id}/

>

```json
{"openapi":"3.0.3","info":{"title":"Secured Checkout API","version":"1.0.0"},"security":[{"tokenAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Payment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,2})?$"},"currency":{"type":"string","readOnly":true},"base_amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,2})?$"},"base_currency":{"type":"string","readOnly":true},"fee":{"type":"string","readOnly":true},"refunded":{"type":"string","format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,2})?$"},"status":{"$ref":"#/components/schemas/StatusEnum"},"refund":{"type":"array","items":{"$ref":"#/components/schemas/Refund"},"readOnly":true},"created":{"type":"string","format":"date-time","readOnly":true}},"required":["amount","base_currency","created","currency","fee","id","refund"]},"StatusEnum":{"enum":["pending","partial","success","failed","canceled","expired","authorized","refunded","partial_refunded","disputed","disputed_won","disputed_lost","disputed_close"],"type":"string","description":"* `pending` - Pending\n* `partial` - Partially Paid\n* `success` - Success\n* `failed` - Failed\n* `canceled` - Canceled\n* `expired` - Expired\n* `authorized` - Authorized\n* `refunded` - Refunded\n* `partial_refunded` - Partially Refunded\n* `disputed` - Disputed\n* `disputed_won` - Disputed - Won\n* `disputed_lost` - Disputed - Lost\n* `disputed_close` - Disputed - Closed"},"Refund":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"amount":{"type":"string","format":"decimal","pattern":"^-?\\d{0,6}(?:\\.\\d{0,2})?$"},"currency":{"type":"string","readOnly":true},"payment":{"type":"string","format":"uuid"},"gateway_id":{"type":"string","maxLength":255},"created":{"type":"string","format":"date-time","readOnly":true}},"required":["amount","created","currency","gateway_id","id","payment"]}}},"paths":{"/v1/transaction/payment/{id}/":{"get":{"operationId":"transaction_payment_retrieve","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["transaction"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"description":""}}}}}}
```
