Fizen Pay API Documents
  • Introduction
  • Process Flow
  • Getting Started
    • Register
    • Environment
    • Get your API keys
    • Make your first API request
  • Reference
    • API Reference
      • Charges
        • Create a charge
        • List charges
        • Charge details
        • Cancel a charge
        • Resolve a charge
        • Refund a charge
      • Utilities
        • Fiat to cryptocurrency
    • Webhooks
  • Environment
    • Sandbox
      • Web app
      • Register page
      • Settings page
      • API Endpoint
    • Production
      • Web app
      • Register page
      • Settings page
      • API Endpoint
Powered by GitBook
On this page
  1. Reference
  2. API Reference
  3. Charges

Cancel a charge

Cancels a charge that has been previously created. Supply the unique charge code that was returned when the charge was created.

Note: Only new charges can be successfully canceled. Once payment is detected, charge can no longer be canceled.

Cancel a newly added charge

POST /charges/{chargeCode}/cancel/

Path Parameters

Name
Type
Description

chargeCode*

string

Charge code

{
    "statusCode": 201,
    "time": "2022-03-12T18:12:59.255Z",
    "total": 0
}

{
    "statusCode": 401,
    "message": "Unauthorized"
}

Example request

curl --location --request POST 'https://pay-api.fizen.io/api/integration/v1/charges/code/OST1FNY35QDL/cancel' \
--header 'X-FP-API-KEY: -7abd3993-daf7-4322-84c6-c86e04b3d884'

Example response

{
    "statusCode": 201,
    "time": "2022-03-12T18:17:58.957Z",
    "total": 0
}

PreviousCharge detailsNextResolve a charge

Last updated 2 years ago