# MD for: https://www.mercadopago.com.mx/developers/es/docs/checkout-bricks/card-payment-brick/payment-submission.md \> SERVER\_SIDE > > h1 > > Payment submission to Mercado Pago To continue with the Mercado Pago payment process, your backend should know how to receive form information with the generated token and the filled out data. Your backend should make available a \`/process\_payment\` endpoint to receive all the data. Once the request –with all the collected information– is in your backend, it should be submitted to Mercado Pago through our APIs. The minimum mandatory fields to submit are: \`token\`, \`transaction\_amount\`, \`installments\`, \`payment\_method\_id\` and \`payer.email\`. > NOTE > > Note > > To consult the types and specifications that can be sent and received by the Brick in the onSubmit callback, check the \[technical documentation\](https://github.com/mercadopago/sdk-js/blob/main/docs/bricks/card-payment.md). For this to work, you should configure your \[private key\](https://www.mercadopago.com.mx/developers/en/guides/additional-content/your-integrations/credentials). Also, to interact with our APIs, you should use \[Mercado Pago official SDK\](https://www.mercadopago.com.mx/developers/en/docs/sdks-library/landing). > WARNING > > Important > > Before making the API call, it is important to validate that the data that will be sent is correct. So, if you already have some kind of session on your integration server where the purchase context information is stored, you can use it to compare the data received from the frontend. > \> Also, it is mandatory to send the attribute \`X-Idempotency-Key\` to ensure the execution and reexecution of requests without the risk of accidentally performing the same action more than once. To do so, update our \[SDKs Library\](https://www.mercadopago.com.mx/developers/en/docs/sdks-library/landing), or generate a UUID V4 and send it in the \_header\_ of your requests. * [csharp ](#editor%5F5) * [curl ](#editor%5F7) * [java ](#editor%5F3) * [node ](#editor%5F2) * [php ](#editor%5F1) * [python ](#editor%5F6) * [ruby ](#editor%5F4) php node java ruby csharp python curl You can find payment status in _status_ value. ``` setCustomHeaders(["X-Idempotency-Key: "]); $payment = $client->create([ "transaction_amount" => (float) $_POST[''], "token" => $_POST[''], "description" => $_POST[''], "installments" => $_POST[''], "payment_method_id" => $_POST[' $_POST[''], "payer" => [ "email" => $_POST[''], "identification" => [ "type" => $_POST[' $_POST[''] ] ] ], $request_options); echo implode($payment); ?> ``` Copiar You can find payment status in _status_ value. ``` const mercadopago = require('mercadopago'); import { MercadoPagoConfig, Payment } from '@src/index'; const client = new MercadoPagoConfig({ accessToken: '', options: { timeout: 5000 } }); const payment = new Payment(client); payment .create({ body: { transaction_amount: 100, token: '', description: '', installments: 1, payment_method_id: '', issuer_id: 310, payer: { email: '', identification: { number: '12345678909', type: 'CPF', }, }, }, }).then(console.log).catch(console.log); ``` Copiar You can find payment status in _status_ value. ``` Map customHeaders = new HashMap<>(); customHeaders.put("x-idempotency-key", ); MPRequestOptions requestOptions = MPRequestOptions.builder() .customHeaders(customHeaders) .build(); MercadoPagoConfig.setAccessToken("YOUR_ACCESS_TOKEN"); PaymentClient client = new PaymentClient(); PaymentCreateRequest paymentCreateRequest = PaymentCreateRequest.builder() .transactionAmount(request.getTransactionAmount()) .token(request.getToken()) .installments(request.getInstallments()) .paymentMethodId(request.getPaymentMethodId()) .payer( PaymentPayerRequest.builder() .email(request.getPayer().getEmail()) .identification( IdentificationRequest.builder() .type(request.getPayer().getIdentification().getType()) .number(request.getPayer().getIdentification().getNumber()) .build()) .build()) .build(); client.create(paymentCreateRequest, requestOptions); ``` Copiar You can find payment status in _status_ value. ``` require 'mercadopago' sdk = Mercadopago::SDK.new('YOUR_ACCESS_TOKEN') custom_headers = { 'x-idempotency-key': '' } custom_request_options = Mercadopago::RequestOptions.new(custom_headers: custom_headers) payment_data = { transaction_amount: params[:transactionAmount].to_f, token: params[:token], installments: params[:installments].to_i, payment_method_id: params[:paymentMethodId], payer: { email: params[:cardholderEmail], identification: { number: params[:identificationNumber] } } } payment_response = sdk.payment.create(payment_data, custom_request_options) payment = payment_response[:response] puts payment ``` Copiar You can find payment status in _status_ value. ``` using System; using MercadoPago.Client.Common; using MercadoPago.Client.Payment; using MercadoPago.Config; using MercadoPago.Resource.Payment; MercadoPagoConfig.AccessToken = "YOUR_ACCESS_TOKEN"; var requestOptions = new RequestOptions(); requestOptions.CustomHeaders.Add("x-idempotency-key", ""); var paymentRequest = new PaymentCreateRequest { TransactionAmount = decimal.Parse(Request["transaction_amount"]), Token = Request["token"], Installments = int.Parse(Request["installments"]), PaymentMethodId = Request["payment_method_id"], Payer = new PaymentPayerRequest { Email = Request["payer"]["email"], Identification = new IdentificationRequest { Number = Request["payer"]["identification"]["number"], }, }, }; var client = new PaymentClient(); Payment payment = await client.CreateAsync(paymentRequest, requestOptions); Console.WriteLine(payment.Status); ``` Copiar You can find payment status in _status_ value. ``` import mercadopago sdk = mercadopago.SDK("ACCESS_TOKEN") request_options = mercadopago.config.RequestOptions() request_options.custom_headers = { 'x-idempotency-key': '' } request_values = request.get_json() payment_data = { "transaction_amount": float(request_values["transaction_amount"]), "token": request_values["token"], "installments": int(request_values["installments"]), "payment_method_id": request_values["payment_method_id"], "issuer_id": request_values["issuer_id"], "payer": { "email": request_values["payer"]["email"], "identification": { "type": request_values["payer"]["identification"]["type"], "number": request_values["payer"]["identification"]["number"] } } } payment_response = sdk.payment().create(payment_data, request_options) payment = payment_response["response"] print("status =>", payment["status"]) print("status_detail =>", payment["status_detail"]) print("id =>", payment["id"]) ``` Copiar You can find payment status in _status_ value. ``` curl -X POST \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'X-Idempotency-Key: SOME_UNIQUE_VALUE' \ 'https://api.mercadopago.com/v1/payments' \ -d '{ "transaction_amount": 100, "token": "ff8080814c11e237014c1ff593b57b4d", "installments": 1, "payment_method_id": "visa", "issuer_id": 310, "payer": { "email": "PAYER_EMAIL_HERE" } }' ``` Copiar \## Response \`\`\`json { "status": "approved", "status\_detail": "accredited", "id": 3055677, "date\_approved": "2019-02-23T00:01:10.000-04:00", "payer": { ... }, "payment\_method\_id": "visa", "payment\_type\_id": "credit\_card", "refunds": \[\], ... } \`\`\` The onSubmit callback contains all the necessary data for a payment creation, however, if you wish, it is possible to include additional details, which can facilitate the purchase recognition by the payer, and increase the payment approval rate. To do that, add the relevant fields to the recieved object, contained in the Brick's onSubmit callback. Some of these fields are: \`description\` (this field can be shown in created tickets) and \`external\_reference\` (id of the purchase in your website, which eases the purchase recognition for the buyer). It is also possible to add complementary buyer's data. > NOTE > > Important > > We recommend adherence to the 3DS 2.0 protocol, in order to increase the probability of approval of your payments, which can be done as described \[here.\](https://www.mercadopago.com.mx/developers/en/docs/checkout-bricks/how-tos/integrate-3ds) Check \[API References\](https://www.mercadopago.com.mx/developers/en/reference/online-payments/checkout-api-payments/create-payment/post) to learn about all the available fields for full payments. ## Test your integration With the integration completed, you will be able to test payment reception. For more information, access the section \[Make test purchase\](https://www.mercadopago.com.mx/developers/en/docs/checkout-bricks/integration-test/test-payment-flow).