---
agentTools:
  projectIndex: https://chimoney.readme.io/llms.txt
---

# Redeem giftcard.

Redeems a Chimoney transaction as a gift card by specifying the recipient's email, country code, product ID, and the reference code `chiRef`

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Chimoney API Docs",
    "version": "0.2.4",
    "description": "This is the latest version of the Chimoney API. For deprecated version routes, please refer to /v0.2/api-docs."
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.chimoney.io/",
      "description": "Prod Server"
    },
    {
      "url": "https://api-v2-sandbox.chimoney.io",
      "description": "Sandbox API v2 (v0.2.4)"
    }
  ],
  "paths": {
    "/v0.2.4/redeem/gift-card": {
      "post": {
        "summary": "Redeem giftcard.",
        "tags": [
          "Redeem"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subAccount": {
                    "type": "string",
                    "description": "Subaccount if any.",
                    "example": "1234567"
                  },
                  "chiRef": {
                    "type": "string",
                    "description": "Chi reference.",
                    "example": "1234567"
                  },
                  "redeemOptions": {
                    "type": "object",
                    "description": "Data needed to redeem.",
                    "properties": {
                      "email": {
                        "type": "string",
                        "example": "test@gmail.com"
                      },
                      "countryCode": {
                        "type": "string",
                        "example": "+234"
                      },
                      "productId": {
                        "type": "string",
                        "example": "2334"
                      }
                    }
                  }
                },
                "required": [
                  "chiRef",
                  "redeemOptions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully redeemed gift card.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "message": {
                      "type": "string",
                      "example": "Gift card redeemed successfully"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "APCPpcya0vyxtT6cHarp"
                        },
                        "valueInUSD": {
                          "type": "number",
                          "example": 10
                        },
                        "chimoney": {
                          "type": "integer",
                          "example": 10000
                        },
                        "issueID": {
                          "type": "string",
                          "example": "69791840-4f46-4e97-b6fd-b411bde50202_10_1723654027431"
                        },
                        "fee": {
                          "type": "integer",
                          "example": 0
                        },
                        "type": {
                          "type": "string",
                          "example": "api-payment"
                        },
                        "subAccount": {
                          "type": "string",
                          "example": "69791840-4f46-4e97-b6fd-b411bde50202"
                        },
                        "issuer": {
                          "type": "string",
                          "example": "69791840-4f46-4e97-b6fd-b411bde50202"
                        },
                        "t_id": {
                          "type": "integer",
                          "example": 429775
                        },
                        "chiRef": {
                          "type": "string",
                          "example": "20091480-8f61-43d6-b2ec-97de96c21d01"
                        },
                        "meta": {
                          "type": "object",
                          "example": {}
                        },
                        "integration": {
                          "type": "object",
                          "properties": {
                            "appID": {
                              "type": "string",
                              "example": "rCh0APD3W3V7SE4EDVn6"
                            },
                            "isFromScrim": {
                              "type": "boolean",
                              "example": false
                            }
                          }
                        },
                        "turnOffNotification": {
                          "type": "boolean",
                          "example": false
                        },
                        "issueDate": {
                          "type": "string",
                          "example": "2024-08-14T16:47:08.253Z"
                        },
                        "payerEmail": {
                          "type": "string",
                          "example": "favour@chimoney.io"
                        },
                        "redirect_url": {
                          "type": "string",
                          "example": "https://test.com"
                        },
                        "redeemData": {
                          "type": "object",
                          "properties": {
                            "walletID": {
                              "type": "string",
                              "example": "bFQntsPMWtfg0MQ5r911"
                            }
                          }
                        },
                        "initiatedBy": {
                          "type": "string",
                          "example": "qP3P6bjbjLZUMxVfxgEqzOF0hNM2"
                        },
                        "fundsAvailableDate": {
                          "type": "string",
                          "nullable": true,
                          "example": null
                        },
                        "updatedDate": {
                          "type": "string",
                          "example": "2024-08-14T16:47:29.320Z"
                        },
                        "paymentDate": {
                          "type": "string",
                          "example": "2024-08-14T16:47:29.320Z"
                        },
                        "status": {
                          "type": "string",
                          "example": "paid"
                        },
                        "walletID": {
                          "type": "string",
                          "example": "bFQntsPMWtfg0MQ5r911"
                        },
                        "email": {
                          "type": "string",
                          "example": "ogedifavour2@gmail.com"
                        },
                        "countryCode": {
                          "type": "string",
                          "example": 234
                        },
                        "productId": {
                          "type": "string",
                          "example": 232222
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/TransactionNotFoundError"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "responses": {
      "Forbidden": {
        "description": "Access to this resource is forbidden.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Forbidden"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Access to this resource is not available for unauthenticated users.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Unauthorized"
            }
          }
        }
      },
      "ServerError": {
        "description": "Indicates an internal server error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ServerError"
            }
          }
        }
      },
      "ValidationError": {
        "description": "Validation error in the request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "TransactionNotFoundError": {
        "description": "Error indicating that the transaction was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/TransactionNotFoundError"
            }
          }
        }
      }
    },
    "schemas": {
      "Forbidden": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the response.",
            "example": "error"
          },
          "error": {
            "type": "string",
            "description": "Error message indicating forbidden access.",
            "example": "API Access not enabled for account Test. Email support@chimoney.io"
          }
        }
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the response.",
            "example": "error"
          },
          "error": {
            "type": "string",
            "description": "Error message indicating unauthorized access.",
            "example": "API key is not defined. Generate a new one from the developer portal."
          }
        }
      },
      "ServerError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the error.",
            "example": "error"
          },
          "type": {
            "type": "string",
            "description": "Type of server error.",
            "example": "server error"
          },
          "code": {
            "type": "string",
            "description": "Specific error code for server issues.",
            "example": "INTERNAL_SERVER_ERROR"
          },
          "message": {
            "type": "string",
            "description": "Detailed message explaining the issue.",
            "example": "An internal server error occurred."
          }
        }
      },
      "ValidationError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the validation error.",
            "example": "error"
          },
          "type": {
            "type": "string",
            "description": "Type of validation error.",
            "example": "Validation Error"
          },
          "code": {
            "type": "string",
            "description": "Error code indicating validation issue.",
            "example": "INVALID_REQUEST"
          },
          "message": {
            "type": "string",
            "description": "Detailed validation error message.",
            "example": "The request parameters are invalid."
          }
        }
      },
      "TransactionNotFoundError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the error.",
            "example": "error"
          },
          "type": {
            "type": "string",
            "description": "Type of error indicating transaction not found.",
            "example": "Resource Not Found"
          },
          "code": {
            "type": "string",
            "description": "Error code for transaction not found.",
            "example": "TRANSACTION_NOT_FOUND"
          },
          "message": {
            "type": "string",
            "description": "Detailed message explaining the transaction not found error.",
            "example": "The transaction with the provided ID could not be found."
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Redeem",
      "description": "All redeem operations."
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 208,
      "2": 243,
      "3": 240,
      "4": 73,
      "5": 214,
      "6": 34,
      "7": 0,
      "8": 37,
      "9": 190,
      "10": 200,
      "11": 166
    }
  }
}
```