Create payment
POST /api/payments/v1/new
Creates payment and performs desired operation.
When mode is set to direct - customer field becomes required.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”object
URL where the user will be redirected after the payment is completed.
If the payment requires 3-D Secure, the user will be redirected to this URL after completing the 3DS flow.
If result_url is not provided the user will be redirected to the URL configured in the project settings.
If true - funds are transferred to recipient account.
If false - you have to call POST /api/payments/v1/confirm for additional confirmation of funds transfer.
object
Color theme of checkout for the hosted payment mode
Locale of checkout for the hosted payment mode
User ID in external system
Based on your choice in type field, one of the fields becomes required too.
object
object
object
object
object
object
object
object
Color theme of checkout for the hosted payment mode
Locale of checkout for the hosted payment mode
object
You can use external_id to link the corresponding payment within your system.
This could be order ID or any other logical identifier.
You can pass same external ID on every payment attempt until you receive success one.
At most one success payment is allowed with same external_id within single login. If such
condition occurs, request will complete with corresponding error.
Unified external id.
object
Example
0Example
0Tax group is required for projects with enabled fiscalization.
- 1: ПДВ 20%
- 2: Без ПДВ
- 3: ПДВ 20% + акциз 5%
- 4: ПДВ 7%
- 5: ПДВ 0%
- 6: Без ПДВ + акциз 5%
- 7: Не є об`єктом ПДВ
- 8: ПДВ 20% + ПФ 7.5%
- 9: ПДВ 14%
object
User ID in external system
Based on your choice in type field, one of the fields becomes required too.
object
object
object
object
object
Describes the way of the integration:
hosted- returns checkout page, where user can enter his payment details.direct- requires customer’s payment details in request. Usually returns url for second factor (3DS or other).express_checkout- requires list of products in request. Returns checkout url.
Callbacks
Section titled “ Callbacks ”CPAYProcessingCallback
Section titled “CPAYProcessingCallback”Return transaction data if payment was processed successfully or occurred the business error
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”With this header, you can verify if the callback is from RozetkaPay.
Calculation algorithm:
signature=base64url_encode(sha1($password + base64url_encode($json_body) + $password))Request Body
Section titled “Request Body ”object
Object which contains information about required post-request action. Will be null if action not required.
object
Action value. Usually it’s a checkout url or 3ds verification url.
object
Example
0object
Example
0Method name called on payment flow provider side.
object
Fiscalization identifier
Fiscalization receipt URL
Fiscalization status
Fiscalization status code
- 1000: Test result
- 1001: Operation successful
- 1002: Operation in progress
- 2001: Invalid fiscalization data. Please verify product information
- 2002: Internal error. Please contact support
- 2003: Not authorized. Please check your permissions
- 2004: Temporary failure. Please try again later
- 2005: Fiscalization service temporarily unavailable
- 2006: Not authorized. Please verify your token
- 3001: Required data not found
- 3002: Duplicate attempt detected
- 4001: Cash register not activated in tax system
- 4002: Cash register blocked. Please contact support
- 4003: Cash register data conflict detected. Please try again later
- 4004: Cash register processing another operation. Please try again later
- 4005: Cannot change cash register operating mode
- 4006: Cash register locked by another application. Please close all other fiscal software
- 4050: Fiscal shift not opened. Please open a shift in your cash register before processing transactions
- 4051: Fiscal shift is not closed. Please close the current shift
- 5001: Electronic signature key not registered with tax authorities. Please register your EDS key in the tax system before enabling fiscalization
- 5002: Electronic signature key has been revoked. Please obtain and register a new EDS certificate
- 5003: Electronic signature verification failed. Please check your EDS key validity and permissions
- 6001: Tax authority service error. Please contact support
- 6002: Tax authority service unavailable. Please try again later
- 6003: Tax authority response timeout. Please try again later
- 7001: Fiscal receipt validation failed. Receipt sequence broken. Please contact support
- 7002: Fiscal receipt generation failed. Please contact support
Fiscalization status description
External identifier from the merchant, one per batch. Unique within the project. The parameter is used for the batch payment logic.
Example
0object
object
object
object
object
Responses
Section titled “ Responses ”Shows that callback was accepted. No further callback after this response.
Responses
Section titled “ Responses ”object
Object which contains information about required post-request action. Will be null if action not required.
object
Action value. Usually it’s a checkout url or 3ds verification url.
object
Example
0object
Example
0Method name called on payment flow provider side.
object
Fiscalization identifier
Fiscalization receipt URL
Fiscalization status
Fiscalization status code
- 1000: Test result
- 1001: Operation successful
- 1002: Operation in progress
- 2001: Invalid fiscalization data. Please verify product information
- 2002: Internal error. Please contact support
- 2003: Not authorized. Please check your permissions
- 2004: Temporary failure. Please try again later
- 2005: Fiscalization service temporarily unavailable
- 2006: Not authorized. Please verify your token
- 3001: Required data not found
- 3002: Duplicate attempt detected
- 4001: Cash register not activated in tax system
- 4002: Cash register blocked. Please contact support
- 4003: Cash register data conflict detected. Please try again later
- 4004: Cash register processing another operation. Please try again later
- 4005: Cannot change cash register operating mode
- 4006: Cash register locked by another application. Please close all other fiscal software
- 4050: Fiscal shift not opened. Please open a shift in your cash register before processing transactions
- 4051: Fiscal shift is not closed. Please close the current shift
- 5001: Electronic signature key not registered with tax authorities. Please register your EDS key in the tax system before enabling fiscalization
- 5002: Electronic signature key has been revoked. Please obtain and register a new EDS certificate
- 5003: Electronic signature verification failed. Please check your EDS key validity and permissions
- 6001: Tax authority service error. Please contact support
- 6002: Tax authority service unavailable. Please try again later
- 6003: Tax authority response timeout. Please try again later
- 7001: Fiscal receipt validation failed. Receipt sequence broken. Please contact support
- 7002: Fiscal receipt generation failed. Please contact support
Fiscalization status description
External identifier from the merchant, one per batch. Unique within the project. The parameter is used for the batch payment logic.
Example
0object
object
object
object
object
object
object
object
Too Many Requests.
object
Headers
Section titled “Headers ”Request limit per second.
The number of requests left for the time window.
Seconds needed for full regeneration.