创建一笔新的信用卡收款。
POST
https://api.payzu.io/v1/chargesResponses
curl -X POST "https://api.payzu.io/v1/charges" \ -H "Authorization: Bearer {{token}}" \ -H "Content-Type: application/json" \ -d '{ "amount": 10000, "paymentType": "creditcard", "externalId": "pedido-1234", "postbackUrl": "https://seusite.com.br/webhooks/payzu", "customer": { "name": "Maria Souza", "identity": "11144477735", "identityType": "CPF", "email": "maria.souza@example.com", "phone": "11999998888" }, "cart": [ { "name": "Plano Pro", "quantity": 1, "sku": "PRO", "unitPrice": 10000 } ], "creditCardPayment": { "installments": 1, "authenticate": false, "card": { "number": "4111111111111111", "holder": "MARIA SOUZA", "expiration": "12/2030", "cvv": "123" } } }'const body = JSON.stringify({ "amount": 10000, "paymentType": "creditcard", "externalId": "pedido-1234", "postbackUrl": "https://seusite.com.br/webhooks/payzu", "customer": { "name": "Maria Souza", "identity": "11144477735", "identityType": "CPF", "email": "maria.souza@example.com", "phone": "11999998888" }, "cart": [ { "name": "Plano Pro", "quantity": 1, "sku": "PRO", "unitPrice": 10000 } ], "creditCardPayment": { "installments": 1, "authenticate": false, "card": { "number": "4111111111111111", "holder": "MARIA SOUZA", "expiration": "12/2030", "cvv": "123" } }})fetch("https://api.payzu.io/v1/charges", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer {{token}}" }, body})import requestsurl = "https://api.payzu.io/v1/charges"body = """{ "amount": 10000, "paymentType": "creditcard", "externalId": "pedido-1234", "postbackUrl": "https://seusite.com.br/webhooks/payzu", "customer": { "name": "Maria Souza", "identity": "11144477735", "identityType": "CPF", "email": "maria.souza@example.com", "phone": "11999998888" }, "cart": [ { "name": "Plano Pro", "quantity": 1, "sku": "PRO", "unitPrice": 10000 } ], "creditCardPayment": { "installments": 1, "authenticate": false, "card": { "number": "4111111111111111", "holder": "MARIA SOUZA", "expiration": "12/2030", "cvv": "123" } }}"""response = requests.request("POST", url, data = body, headers = { "Content-Type": "application/json", "Authorization": "Bearer {{token}}"})print(response.text)200