# 8.2. Charging an existing profile After successful profile registration, the `paymentProfileId` parameter will be returned. It is required in order to charge the profile. To charge an existing profile, send a `POST` request to: ``` https://api.axepta.pl/v1/merchant/{merchantId}/transaction/profile ``` where: * `merchantId` - client identifier. #### Example URL to send the POST request to ``` https://api.axepta.pl/v1/merchant/6yt3gjtm9p7b8h9xsdqz/transaction/profile ``` #### Request payload ```json { "serviceId": "63f574ed-d4ad-407e-9981-39ed7584a7b7", "paymentProfileId": "39ac1087-e632-41ff-acb8-8d661068a9d5", "amount": 100, "currency": "PLN", "orderId": "123456" } ``` where: | Parameter | Type | Required | Description | |----------|------|----------|-------------| | `serviceId` | string(36) | ✔️ | Store identifier as UUID v4. | | `paymentProfileId` | string(36) | ✔️ | Identifier of the profile to be charged. | | `amount` | integer(1-999999999) | ✔️ | Amount in the smallest currency unit, e.g. grosz. | | `currency` | string(3) | ✔️ | Currency in ISO 4217 format. | | `orderID` | string(100) | ✔️ | Merchant order number - allowed characters: A-Za-z0-9#_-.\/ plus space and UNICODE 00C0 - 02C0. | | `title` | string(255) | - | Transaction title - allowed characters: A-Za-z0-9#&_-"',.\/ plus space and UNICODE 00C0 - 02C0. | #### Possible statuses Attempting to charge a profile can return two statuses: | Status | Type | Description | |--------|------|-------------| | `Success` | string | Success - profile charged | | `Fail` | string | Error - profile was not charged | #### Server response If an attempt is made to charge an inactive profile, the response will look like: ```json { "status": "FAIL", "message": "Payment profile inactive.", "data": { "errorCode": "PAYMENT_PROFILE_INACTIVE", "errorId": 120301, "bqh": "6jO" } } ``` #### ErrorCode descriptions When the server returns status "FAIL", the following errors (`errorCode`) may occur: | errorCode | Type | Description | |----------|------|-------------| | `PAYMENT_PROFILE_INACTIVE` | string | Payment profile deactivated | | `PAYMENT_PROFILE_NOT_FOUND` | string | Payment profile not found | | `SCHEMA_VALIDATION` | string | Character validation error. The request payload is invalid or does not meet character requirements |