Пример запроса POST:
Content-Type: application/json
https:{domain}/receipt
{
"key": "AutoTest_54FZ(OrangeData)",
"merchant_order_id": "TestOrder123",
"credential": {
"terminal_password": "123"
},
"goods": [
{
"name": "Usluga1",
"price": "1111",
"tax": 1,
"payment_subject_type": 3,
"payment_method_type": 4
},
{
"name": "Usluga2",
"price": "2500",
"tax": 1,
"payment_subject_type": 3,
"payment_method_type": 2
}
],
"custom_params_rdy": {
"Email": "user@example.com"
},
"amount_payment_type": {
"2": 2500,
"14": 1111
},
"operation_type": 1
}
Пример реализации запроса в программном коде:
curl -X POST \
https:{domain}/receipt \
-H 'Content-Type: application/json' \
-d '{"key":"AutoTest_54FZ(OrangeData)","merchant_order_id":"TestOrder123","credential":{"terminal_password":"123"},"goods":[{"name":"Usluga1","price":"1111","tax":1,"payment_subject_type":3,"payment_method_type":4},{"name":"Usluga2","price":"2500","tax":1,"payment_subject_type":3,"payment_method_type":2}],"custom_params_rdy":{"Email":"user@example.com"},"amount_payment_type":{"2":2500,"14":1111},"operation_type":1}'
Пример запроса POST:
Content-Type: application/x-www-form-urlencoded
https:{domain}/receipt
Key:AutoTest_54FZ(OrangeData)
OrderId:TestOrder123
Password:123
AmountPaymentType:2=2500;14=1500
Goods:Usluga1=1500,1,3,4;Usluga2=2500,1,3,2
CustomParams:Email=user@example.com
OperationType:1
Пример реализации запроса в программном коде:
curl -X POST \
https:{domain}/receipt \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'Key=AutoTest_54FZ(OrangeData)&OrderId=TestOrder123&Password=123&AmountPaymentType=2%3D2500%3B14%3D1500&Goods=Usluga1%3D1500%2C1%2C3%2C4%3BUsluga2%3D2500%2C1%2C3%2C2&CustomParams=Email%3Duser%40example.com&OperationType=1'