Our Payment Transaction API allows you to create and retrieve payment transactions. Here's how you can use it:
To create a payment transaction, send a POST request to our payment transaction endpoint. The URL for this endpoint is https://api.paywithbreeze.co/api/v1/payments.
Include the following parameters in the body of your request:
$ curl -X POST https://api.paywithbreeze.co/api/v1/payments \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d amount=100.00
Replace YOUR_ACCESS_TOKEN with your actual access token.
If your request is successful, you'll receive a response that includes the details of the payment transaction.
To retrieve a payment transaction, send a GET request to our payment transaction endpoint with the ID of the payment transaction. The URL for this endpoint is 'https://api.paywithbreeze.co/api/v1/payments/{id}'.
Here's an example of how to make this request using curl:
$ curl -X GET https://api.paywithbreeze.co/api/v1/payments/1 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Replace 1 with the ID of the payment transaction, and YOUR_ACCESS_TOKEN with your actual access token.
If your request is successful, you'll receive a response that includes the details of the payment transaction.
{
"id": "1",
"status": "pending",
"amount": "100.00",
"currency": "AUD",
"redirect_url": "https://app.paywithbreeze.co/checkout?id=62956ac67e8cf859782887146d77938be53d6c47",
"created_at": "2023-06-24T12:00:00Z",
"updated_at": "2023-06-24T12:00:00Z"
}
In this example, redirect_url is the URL to which the user should be redirected to complete the payment. The user's client or browser would typically handle this redirection.