# Payment

This resource represents a payment attempt made by your customer. The payment can either be successfully completed or failed, depending on various factors.

## Create a payment

 - [POST /payment](https://docs.glomopay.com/api-documentation/apis/openapi/payment/createpayment.md): Creates a payment for an order or subscription. For initial payments, card details and a callback URL are required. For subsequent payments on as_presented subscriptions, the card from the last successful payment is reused, and request_id, amount, and currency are required instead.

Either order_id or subscription_id must be provided, but not both.

## List all payments

 - [GET /payment](https://docs.glomopay.com/api-documentation/apis/openapi/payment/getpayments.md)

## Create a mock payment

 - [POST /payment/mock](https://docs.glomopay.com/api-documentation/apis/openapi/payment/createmockpayment.md): This API is only available in sandbox mode. Creates a mock payment of specified amount for any given Payment link.

## Retrieve a payment

 - [GET /payment/{id}](https://docs.glomopay.com/api-documentation/apis/openapi/payment/getpaymentbyid.md)

## Update RFI for Payment

 - [PATCH /payment/{id}/update_rfi](https://docs.glomopay.com/api-documentation/apis/openapi/payment/updaterfipayment.md)

## Mock funds available

 - [PATCH /payment/{id}/mock-funds-available](https://docs.glomopay.com/api-documentation/apis/openapi/payment/mockupdatepaymentfundsavailable.md): This API is only available in sandbox mode. Updates the funds_available status of a payment to simulate  the availability of funds for testing purposes.

