Logo
GoCardless API API Documentation

Core Endpoints-Payments

Number of APIs: 6


1. Get a single Payment

GET {{url}}/payments/{{payment}}

Retrieves the details of a single existing payment.

Get a single Payment API Docs



2. Cancel a Payment

POST {{url}}/payments/{{payment}}/actions/cancel

Cancels the payment if it has not already been submitted to the banks. Any metadata supplied to this endpoint will be stored on the payment cancellation event it causes.

This will fail with a cancellationfailed error unless the payment’s status is pendingsubmission.

Cancel a payment API Docs



3. Retry Payment

POST {{url}}/payments/{{payment}}/actions/retry

Retries a failed payment if the underlying mandate is active. You will receive a resubmission_requested webhook, but after that retrying the payment follows the same process as its initial creation, so you will receive a submitted webhook, followed by a confirmed or failed event. Any metadata supplied to this endpoint will be stored against the payment submission event it causes.

This will return a retry_failed error if the payment has not failed.

Payments can be retried up to 3 times.

Retry a failed payment API Docs



4. Update a Payment

PUT {{url}}/payments/{{payment}}

Updates a payment object. This accepts only the metadata parameter.

Update a Payment API Docs



5. List Payments

GET {{url}}/payments

Returns a cursor-paginated list of your payments.

List Payments API Docs



6. Create a Payment

POST {{url}}/payments

Creates a new payment object.

This fails with a mandateisinactive error if the linked mandate is cancelled or has failed. Payments can be created against mandates with status of: pendingcustomerapproval, pending_submission, submitted, and active.

Create a Payment API Docs



ENDPOINTS