I need to use the Moip payments API as payment method of my system, how do I do the request via json
?
Documentation
Consultar cliente GET
Por meio desta API é possível consultar as informações e detalhes de um cliente.
ENDPOINT GET https://sandbox.moip.com.br/v2/customers/{customer_id}
EXEMPLO GET https://sandbox.moip.com.br/v2/customers/CUS-Y6L4AGQN8HKQ
REQUEST :
Content-Type: application/json
Authorization: "Basic MDEwMTAxMDEwMTAxMDEwMTAxMDEwMTAxMDEwMTAxMDE6QUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQg=="
RESPONSE :
200 (OK)
Content-Type: application/json
{
"id": "CUS-Y6L4AGQN8HKQ",
"ownId": "meu_id_sandbox_1231234",
"fullname": "Jose Silva",
"createdAt": "2015-01-14T11:28:22-0200",
"birthDate": "1988-12-30T00:00:00-0200",
"email": "[email protected]",
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "66778899"
},
"taxDocument": {
"type": "CPF",
"number": "22222222222"
},
"shippingAddress": {
"zipCode": "01234000",
"street": "Avenida Faria Lima",
"streetNumber": "2927",
"complement": "8",
"city": "Sao Paulo",
"district": "Itaim",
"state": "SP",
"country": "BRA"
},
"moipAccount": {
"id": "MPA-M1M01PACC0NT"
},
"_links": {
"self": {
"href": "https://sandbox.moip.com.br/v2/customers/CUS-Y6L4AGQN8HKQ"
}
}
}