API Charges
The charges endpoint is the entry point for the payment orchestrator.
The payment orchestrator is an agnostic entry point to all your payment related needs. It allows to process payments with credit and debit cards as well alternative payments.
The current documentation focuses on payment management with alternative payments.
Card payment2
import requests import json
url = "https://api.dev.alignet.io/charges" payload = json.dumps({
"action": "authorize",
"channel": "7", "payment_method": {
"card": [
{
"pan": "4859510000000051",
"expiry_date": "1220",
"security_code": "365"
}
]
},
"card_holder": [
{
"first_name": "Luis", "last_name": "Rebata",
"email_address": "prueba001@email.com", "identity_document_country": "PER", "identity_document_type": "DNI", "identity_document_identifier": "999590315"
}
],
"transaction": { "currency": "604",
"amount": "100000", "meta": {
"internal_operation_number": "236485", "description": "Descripcion de la transaccion"
}
},
"address": {
"billing": { "first_name": "Luis",
"last_name": "Rebatta",
"email": "prueba001@email.com", "phone": {
"country_code": "51",
"subscriber": "962375123"
},
"location": { "line_1": "NA",
"line_2": "NA",
"city": "NA",
"state": "NA",
"country": "PE", "zip_code": "Sin ZIP"
}
}
}
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'h3SXMZndLJqWg7wQC749qPesm'
}
response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Element name | Type | Length | Required for Panama | Description |
action | String | 9 | Yes | The intend action of the payload. For the current usage the fixed value “authorize” should be used |
channel | String | 1 | Yes | Describes the type of channel through which the transaction to be processed will be sent.
|
payment_method.card.pan | String | 20 | Yes | Value of card used in the transaction |
payment_method.card.expiry _Date | String | 4 | Yes | Card expiration date |
payment_method.card.secure _code | String | 3 | Yes | Card Security Code |
card_holder.first_name | String | 255 | Yes | Cardholder Name |
card_holder.last_name | String | 255 | Yes | Cardholder last name |
card_holder.email_address | String | 254 | Yes | Cardholder email |
card_holder. identity_document_country | String | 255 | No | Country of the cardholder |
card_holder. identity_document_type | String | 255 | No | Type of cardholder document |
card_holder. identity_document_identifier | String | 255 | No | Cardholder document value |
transaction.currency | String | 3 | Yes | ISO numeric value of currency |
transaction.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. |
transaction.meta.internal_ope ration_number | String | 1024 | Yes | Transaction operation number |
transaction.meta.description | String | 2048 | No | Description of the transaction |
address.billing. first_name | String | 255 | No | Billing information |
address.billing. last_name | String | 255 | No | Billing information |
address.billing.email | String | 254 | No | Billing information |
address.billing.phone.country _code | String | 32 | No | billing information |
address.billing.phone.subscrib er | String | 128 | No | Billing information |
address.billing. first_name | String | 255 | No | Billing information |
address.billing. last_name | String | 255 | No | Billing information |
address.billing.email | String | 254 | No | Billing information |
Continuar Authorization with 3DSecure (Charges 3DS) ➡️