JUMP TOSmartpay APICore ConceptsAuthenticationErrorsIdempotencyMetadataPaginationData TypesTestingCheckoutCheckout SessionsThe checkout session objectCreate a checkout sessionpostRetrieve a checkout sessiongetList all checkout sessionsgetOrder ManagementOverviewOrdersThe order objectCreate an order using a tokenpostRetrieve an ordergetCancel an orderputList all ordersgetPaymentsThe payment objectCreate a paymentpostRetrieve a paymentgetUpdate a paymentpatchList all paymentsgetRefundsThe refund objectCreate a refundpostRetrieve a refundgetUpdate a refundpatchList all refundsgetCoupons and Promotion codesCouponsThe coupon objectCreate a couponpostRetrieve a coupongetUpdate a couponpatchList all couponsgetPromotion CodesThe promotion code objectCreate a promotion codepostRetrieve a promotion codegetUpdate a promotion codepatchList all promotion codesgetWebhooksOverviewThe event objectReceive webhooksWebhook EndpointsThe webhook endpoint objectCreate a webhook endpointpostRetrieve a webhook endpointgetUpdate a webhook endpointpatchDelete a webhook endpointdeleteList all webhook endpointsgetTokensTokensThe token objectRetrieve a tokengetEnable a tokenputDisable a tokenputDelete a tokendeleteList all tokensgetCreate a refundpost https://api.smartpay.co/v1/refunds When you create a new refund, you must specify the Payment object on which to create it. Creating a new refund will refund a payment that has previously been created but not yet fully refunded. Funds will be refunded to the shopper that was originally charged. You can optionally refund only part of a charge. You can do so multiple times, until the entire payment has been refunded. Once entirely refunded, a payment can’t be refunded again. This method will return an error when called on an already-refunded payment, or when trying to refund more money than is left on the payment. Refunds are final and can not be reversed. Errors In addition to the Errors applicable to all API endpoints, the following errors are specific to creating a refund: status code error code description 404 payment.not-found No payment was found meeting the requirements. Make sure to use the right paymentId and API key. test objects can only be accessed using test keys and live object with live keys. 403 amount.insufficient Available amount on payment is insufficient to handle the request.