{"note":"OpenAPI conversion -- returning structured metadata","name":"payments-service-gov-uk-payments","description":"GOV.UK Pay API","version":"1.0.3","base_url":"https://publicapi.payments.service.gov.uk","endpoints":10,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api GOV.UK Pay API\n@base https://publicapi.payments.service.gov.uk\n@version 1.0.3\n@auth ApiKey Authorization in header\n@endpoints 10\n@toc payments(9), refunds(1)\n\n@group payments\n@endpoint GET /v1/payments\n@desc Search payments\n@optional {reference: any # Your payment reference to search (exact match, case insensitive), email: any # The user email used in the payment to be searched, state: any # State of payments to be searched. Example=success, card_brand: any # Card brand used for payment. Example=master-card, from_date: any # From date of payments to be searched (this date is inclusive). Example=2015-08-13T12:35:00Z, to_date: any # To date of payments to be searched (this date is exclusive). Example=2015-08-14T12:35:00Z, page: any # Page number requested for the search, should be a positive integer (optional, defaults to 1), display_size: any # Number of results to be shown per page, should be a positive integer (optional, defaults to 500, max 500), cardholder_name: any # Name on card used to make payment, first_digits_card_number: any # First six digits of the card used to make payment, last_digits_card_number: any # Last four digits of the card used to make payment, from_settled_date: any # From settled date of payment to be searched (this date is inclusive). Example=2015-08-13, to_settled_date: any # To settled date of payment to be searched (this date is inclusive). Example=2015-08-14}\n@returns(200) OK\n@errors {401: Credentials are required to access this resource, 422: Invalid parameters: from_date, to_date, status, display_size. See Public API documentation for the correct data formats, 429: Too many requests, 500: Downstream system error}\n\n@endpoint POST /v1/payments\n@desc Create new payment\n@required {body: map # requestPayload}\n@returns(201) Created\n@errors {400: Bad request, 401: Credentials are required to access this resource, 422: Invalid attribute value: description. Must be less than or equal to 255 characters length, 429: Too many requests, 500: Downstream system error}\n\n@endpoint GET /v1/payments/{paymentId}\n@desc Find payment by ID\n@required {paymentId: any # Payment identifier}\n@returns(200) OK\n@errors {401: Credentials are required to access this resource, 404: Not found, 429: Too many requests, 500: Downstream system error}\n\n@endpoint POST /v1/payments/{paymentId}/cancel\n@desc Cancel payment\n@required {paymentId: any # Payment identifier}\n@returns(204) No Content\n@errors {400: Cancellation of payment failed, 401: Credentials are required to access this resource, 404: Not found, 409: Conflict, 429: Too many requests, 500: Downstream system error}\n\n@endpoint POST /v1/payments/{paymentId}/capture\n@desc Capture payment\n@required {paymentId: any # Payment identifier}\n@returns(204) No Content\n@errors {400: Capture of payment failed, 401: Credentials are required to access this resource, 404: Not found, 409: Conflict, 429: Too many requests, 500: Downstream system error}\n\n@endpoint GET /v1/payments/{paymentId}/events\n@desc Return payment events by ID\n@required {paymentId: any # Payment identifier}\n@returns(200) OK\n@errors {401: Credentials are required to access this resource, 404: Not found, 429: Too many requests, 500: Downstream system error}\n\n@endpoint GET /v1/payments/{paymentId}/refunds\n@desc Get all refunds for a payment\n@required {paymentId: any}\n@returns(200) OK\n@errors {401: Credentials are required to access this resource, 404: Not found, 429: Too many requests, 500: Downstream system error}\n\n@endpoint POST /v1/payments/{paymentId}/refunds\n@desc Submit a refund for a payment\n@required {paymentId: any # paymentId, body: map # requestPayload}\n@returns(200) successful operation\n@returns(202) ACCEPTED\n@errors {401: Credentials are required to access this resource, 404: Not found, 412: Refund amount available mismatch, 429: Too many requests, 500: Downstream system error}\n\n@endpoint GET /v1/payments/{paymentId}/refunds/{refundId}\n@desc Find payment refund by ID\n@required {paymentId: any, refundId: any}\n@returns(200) OK\n@errors {401: Credentials are required to access this resource, 404: Not found, 429: Too many requests, 500: Downstream system error}\n\n@endgroup\n\n@group refunds\n@endpoint GET /v1/refunds\n@desc Search refunds\n@optional {from_date: any # From date of refunds to be searched (this date is inclusive). Example=2015-08-13T12:35:00Z, to_date: any # To date of refunds to be searched (this date is exclusive). Example=2015-08-14T12:35:00Z, from_settled_date: any # From settled date of refund to be searched (this date is inclusive). Example=2015-08-13, to_settled_date: any # To settled date of refund to be searched (this date is inclusive). Example=2015-08-13, page: any # Page number requested for the search, should be a positive integer (optional, defaults to 1), display_size: any # Number of results to be shown per page, should be a positive integer (optional, defaults to 500, max 500)}\n@returns(200) OK\n@errors {401: Credentials are required to access this resource, 422: Invalid parameters. See Public API documentation for the correct data formats, 500: Downstream system error}\n\n@endgroup\n\n@end\n"}