In the country Chile whole quantities are processed only.

Creation

import requests import json
url = "https://api.dev.alignet.io/charges" 
payload = json.dumps({
{
"action":"authorize",
"channel":"1", 
"payment_method":{ "alternative":{ "provider_name":"monnet", "method_name":"pay_in", "method_details":{
"payin_method":"cash", "currency":"604", "amount":"10000000"
}
}
},
"meta":{ "internal_operation_number":"650531049", 
"description":"payin_request", "additional_fields":{ "capture_method_version":"3.0", 
"pay_in_verification":"string", "pay_in_transaction_successful_url":"https://test.com", "pay_in_transaction_error_url":"https://test.com", 
"pay_in_expiration_time":"120", "pay_in_product_id":"00001",
 "pay_in_product_description":"string",
"pay_in_product_amount":"0001", 
"pay_in_product_sku":"string", "pay_in_product_quantity":"0001", 
"pay_in_regular_customer":"string", 
"pay_in_customer_id":"string", 
"pay_in_discount_coupon":"string",
 "pay_in_filter_by":"string", "pay_in_customer_type_document":"DNI",
 "pay_in_customer_document":"65874582", 
"pay_in_customer_name":"Mario",
 "pay_in_customer_lastname":"Mamani",
"pay_in_customer_email":"test@test.com", 
"pay_in_customer_phone":"999444555", 
"pay_in_customer_address":"string", 
"pay_in_customer_city":"Lima", 
"pay_in_customer_region":"Lima", 
"pay_in_customer_country":"Peru", "pay_in_customer_zip_code":"16588", 
"pay_in_customer_shipping_name":"Mario", "pay_in_customer_shipping_phone":"0000", 
"pay_in_customer_shipping_address":
"Calle Nombre 123", 
"pay_in_customer_shipping_city":"Lima", 
"pay_in_customer_shipping_region":"Lima", "pay_in_customer_shipping_country":"Peru", "pay_in_customer_shipping_zip_code":"16588",
 "pay_in_url": "enable"
}}
}})
headers = {
'Content-Type': 'application/json',
'Authorization': 
'Efre5z9iHWeAbjur67laFRHJp2tzAO1',
 'ALG-API-VERSION': '1647960431'
}
response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
CODE

  

Element name

Type

Length

Mandatory

Description

action

String

6

Yes

The intend action of thepayload. For the current usage the fixed value

“authorize” should be used

channel

String

1

Yes

Describes the type of channel through whichthe transaction to be processed will be sent. For cash-based transactions the value should be : “7”

For e-commerce payments, you should

use the value “1”.

payment_method.alternative. provider_name

String

6

Yes

Name of the provider that will process the transaction. Fixed

Value “monnet” for cash-bsed payments.

payment_method.alternative. method_name

String

6

Yes

Alternative payment method type. Fixed value. “pay_in”

payment_method.alternativ

e. method_details. payin_method

String

12

Yes

Payin method associated with the transaction. Methods: cash, bank_transfer

payment_method.alternative. method_details. currency

String

3

Yes

Transaction currency in ISO numeric value

payment_method.alternative. method_details. amount

String

1024

Yes

Amount of the transaction in cents of currency, taking into account that we consider the last 5 positions as the decimal part of the

amount.

meta. internal_operation_number

String

1024

Yes

Transaction operation number

meta. description

String

2048

Yes

Description of the transaction

meta.additional_fields

.

capture_method_versi on

String

3

Yes

Capture method. Fixed value “3.0”

meta.additional_fields. pay_in_verification

String

128

No

Hexadecimal value of a SHA512 representation of the following concatenation: payinMerchantID+payin MerchantOperationNu mber+payinAmount+pa yinCurrency+KeyMonne t

meta.additional_fields.pay_in_tr ansaction_successful_url

String

2048

Yes

Debe ser Https

meta.additional_fields.pay_in_tr ansaction_error_url

String

2048

Yes

Debe ser Https

meta.additional_fields.pay_in_e xpiration_time

String

32

Yes

Minimum Suggested: Online: 30 minutes

Cash: 2 hours

meta.additional_fields.pay_in_pr oduct_id

String

128

No

The internal Id of the product

meta.additional_fields.pay_in_pr oduct_description

String

2048

No

Product description

meta.additional_fields.pay_in_pr oduct_amount

String

1024

No

Cost of the product

meta.additional_fields.pay_in_pr oduct_sku

String

32

No

Value of the SKU

meta.additional_fields.pay_in_pr oduct_quantity

String

128

No

Quantity of the product

meta.additional_fields.pay_in_re gular_customer

String

255

No

A flag to know if the client is frequent or not.

meta.additional_fields.pay_in_c ustomer_id

String

2048

No

An internal ID related to the customer

meta.additional_fields.pay_in_di scount_coupon

String

256

No

Value of the cupon

meta.additional_fields.pay_in_c ustomer_type_document

String

255

No

Type of the document

meta.additional_fields.pay_in_c ustomer_document

String

255

No

Value of the document ID

meta.additional_fields.pay_in_c ustomer_name

String

255

No

Name of the client

meta.additional_fields.pay_in_c ustomer_lastname

String

255

No

Client last name

meta.additional_fields.pay_in_c ustomer_email

String

254

No

Email Client

meta.additional_fields.pay_in_c ustomer_phone

String

160

No

Client telephone

meta.additional_fields.pay_in_c ustomer_address

String

1024

No

Client Adress

meta.additional_fields.pay_in_c ustomer_city

String

1024

No

customer city

meta.additional_fields.pay_in_c ustomer_region

String

1024

No

Customer region

meta.additional_fields.pay_in_c ustomer_country

String

1024

No

Client country

meta.additional_fields.pay_in_c ustomer_zip_code

String

1024

No

Zip code of the client

meta.additional_fields.pay_in_c ustomer_shipping_name

String

255

No

Telephone of the person to whom theshipment will

arrive

meta.additional_fields.pay_in_c ustomer_shipping_phone

String

160

No

Telephone of the person to whom theshipment will

arrive

meta.additional_fields.pay_in_c ustomer_shipping_address

String

1024

No

Address to which theshipment will arrive

meta.additional_fields.pay_in_c ustomer_shipping_city

String

1024

No

City to which the shipment will arrive

meta.additional_fields.pay_in_c ustomer_shipping_region

String

1024

No

Region to which theshipment will arrive

meta.additional_fields.pay_in_c ustomer_shipping_country

String

1024

No

Country to which theshipment will arrive

meta.additional_fields.pay_in_ customer_shipping_zip_code

String

1024

No

Zip code to which theshipment will arrive

meta.additional_fields.pay_in_u rl

String

32

Yes

Flag to request monnet url to load payment instructions page. If it comes with the value enable, the URL will besent in the response.

Any other value will not

send the URL.