Guest User

Untitled

a guest
Jun 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.18 KB | None | 0 0
  1. PayPal Plus (Sandbox)
  2.  
  3. Compra PARCELADA / SEM desconto à vista:
  4.  
  5. 1. /payment POST
  6. 2. /payment GET
  7. 3. /execute
  8. 4. /payment GET
  9.  
  10. 1. REQUEST
  11.  
  12. {
  13. "intent": "sale",
  14. "payer": {
  15. "payment_method": "paypal"
  16. },
  17. "redirect_urls": {
  18. "return_url": "http://www.paypal.com",
  19. "cancel_url": "http://www.paypal.com"
  20. },
  21. "application_context": {
  22. "locale": "pt-BR",
  23. "brand_name": "Nome Loja",
  24. "shipping_preference": "SET_PROVIDED_ADDRESS"
  25. },
  26. "transactions": [
  27. {
  28. "amount": {
  29. "currency": "BRL",
  30. "total": "200.00",
  31. "details": {
  32. "shipping": "10.00",
  33. "subtotal": "190.00"
  34. }
  35. },
  36. "item_list": {
  37. "items": [
  38. {
  39. "name": "Produto",
  40. "currency": "BRL",
  41. "sku": "123",
  42. "quantity": "1",
  43. "price": "190.00"
  44. }
  45. ],
  46. "shipping_address": {
  47. "city": "cidade",
  48. "country_code": "BR",
  49. "postal_code": "01317000",
  50. "line1": "rua teste, 123, apt 123",
  51. "line2": "bairro",
  52. "state": "estado",
  53. "phone": "(99) 9999-9999"
  54. }
  55. },
  56. "description": "Payment description",
  57. "notify_url": "https://endpoint.com/ppplus",
  58. "payment_options": {
  59. "allowed_payment_method": "IMMEDIATE_PAY"
  60. }
  61. }
  62. ]
  63. }
  64.  
  65. 1. RESPONSE
  66.  
  67. {
  68. "id":"PAY-38703188CD323870ALMWVDJA",
  69. "intent":"sale",
  70. "state":"created",
  71. "payer":{
  72. "payment_method":"paypal"
  73. },
  74. "transactions":[
  75. {
  76. "amount":{
  77. "total":"200.00",
  78. "currency":"BRL",
  79. "details":{
  80. "subtotal":"190.00",
  81. "shipping":"10.00"
  82. }
  83. },
  84. "description":"Payment description",
  85. "payment_options":{
  86. "allowed_payment_method":"IMMEDIATE_PAY",
  87. "recurring_flag":false,
  88. "skip_fmf":false
  89. },
  90. "item_list":{
  91. "items":[
  92. {
  93. "name":"Produto",
  94. "sku":"123",
  95. "price":"190.00",
  96. "currency":"BRL",
  97. "quantity":1
  98. }
  99. ],
  100. "shipping_address":{
  101. "line1":"rua teste, 123, apt 123",
  102. "line2":"bairro",
  103. "city":"cidade",
  104. "state":"estado",
  105. "postal_code":"01317000",
  106. "country_code":"BR",
  107. "phone":"(99) 9999-9999"
  108. }
  109. },
  110. "related_resources":[
  111.  
  112. ],
  113. "notify_url":"https://endpoint.com/ppplus"
  114. }
  115. ],
  116. "create_time":"2018-06-22T19:44:35Z",
  117. "links":[
  118. {
  119. "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-38703188CD323870ALMWVDJA",
  120. "rel":"self",
  121. "method":"GET"
  122. },
  123. {
  124. "href":"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-9XD36955968007920",
  125. "rel":"approval_url",
  126. "method":"REDIRECT"
  127. },
  128. {
  129. "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-38703188CD323870ALMWVDJA/execute",
  130. "rel":"execute",
  131. "method":"POST"
  132. }
  133. ]
  134. }
  135.  
  136. 2. REQUEST (essa API não tem payload)
  137. {}
  138.  
  139. 2. RESPONSE
  140.  
  141. {
  142. "id":"PAY-38703188CD323870ALMWVDJA",
  143. "intent":"sale",
  144. "state":"created",
  145. "cart":"9XD36955968007920",
  146. "payer":{
  147. "payment_method":"paypal",
  148. "status":"UNVERIFIED",
  149. "payer_info":{
  150. "email":"apuhlmann@paypal.com",
  151. "first_name":"arthur",
  152. "last_name":"teste",
  153. "payer_id":"TXZZBZMT6FSMN",
  154. "shipping_address":{
  155. "recipient_name":"arthur teste",
  156. "line1":"rua teste, 123, apt 123",
  157. "line2":"bairro",
  158. "city":"cidade",
  159. "state":"estado",
  160. "postal_code":"01317000",
  161. "country_code":"BR",
  162. "normalization_status":"UNKNOWN"
  163. },
  164. "tax_id_type":"BR_CPF",
  165. "tax_id":"22988294895",
  166. "country_code":"BR"
  167. }
  168. },
  169. "transactions":[
  170. {
  171. "amount":{
  172. "total":"200.00",
  173. "currency":"BRL",
  174. "details":{
  175. "subtotal":"190.00",
  176. "shipping":"10.00"
  177. }
  178. },
  179. "payee":{
  180. "merchant_id":"S2L47VGNDTVQA",
  181. "email":"rest_br@merchant.com.br"
  182. },
  183. "description":"Payment description",
  184. "item_list":{
  185. "items":[
  186. {
  187. "name":"Produto",
  188. "sku":"123",
  189. "price":"190.00",
  190. "currency":"BRL",
  191. "quantity":1
  192. }
  193. ],
  194. "shipping_address":{
  195. "recipient_name":"arthur teste",
  196. "line1":"rua teste, 123, apt 123",
  197. "line2":"bairro",
  198. "city":"cidade",
  199. "state":"estado",
  200. "postal_code":"01317000",
  201. "country_code":"BR",
  202. "normalization_status":"UNKNOWN"
  203. },
  204. "shipping_phone_number":"(99) 9999-9999"
  205. },
  206. "related_resources":[
  207.  
  208. ],
  209. "notify_url":"https://endpoint.com/ppplus"
  210. }
  211. ],
  212. "credit_financing_offered":{
  213. "term":6,
  214. "monthly_payment":{
  215. "value":"33.33",
  216. "currency":"BRL"
  217. },
  218. "discount_amount":{
  219. "value":"0.00",
  220. "currency":"BRL"
  221. }
  222. },
  223. "redirect_urls":{
  224. "return_url":"http://www.paypal.com/?paymentId=PAY-38703188CD323870ALMWVDJA",
  225. "cancel_url":"http://www.paypal.com"
  226. },
  227. "create_time":"2018-06-22T19:44:36Z",
  228. "update_time":"2018-06-22T19:46:40Z",
  229. "links":[
  230. {
  231. "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-38703188CD323870ALMWVDJA",
  232. "rel":"self",
  233. "method":"GET"
  234. },
  235. {
  236. "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-38703188CD323870ALMWVDJA/execute",
  237. "rel":"execute",
  238. "method":"POST"
  239. },
  240. {
  241. "href":"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-9XD36955968007920",
  242. "rel":"approval_url",
  243. "method":"REDIRECT"
  244. }
  245. ]
  246. }
  247.  
  248. 3. REQUEST
  249.  
  250. {
  251. "payer_id": "TXZZBZMT6FSMN"
  252. }
  253.  
  254. 3. RESPONSE
  255.  
  256. {
  257. "id":"PAY-38703188CD323870ALMWVDJA",
  258. "intent":"sale",
  259. "state":"approved",
  260. "cart":"9XD36955968007920",
  261. "payer":{
  262. "payment_method":"paypal",
  263. "status":"UNVERIFIED",
  264. "payer_info":{
  265. "email":"apuhlmann@paypal.com",
  266. "first_name":"arthur",
  267. "last_name":"teste",
  268. "payer_id":"TXZZBZMT6FSMN",
  269. "shipping_address":{
  270. "recipient_name":"arthur teste",
  271. "line1":"rua teste, 123, apt 123",
  272. "line2":"bairro",
  273. "city":"cidade",
  274. "state":"estado",
  275. "postal_code":"01317000",
  276. "country_code":"BR",
  277. "normalization_status":"UNKNOWN"
  278. },
  279. "tax_id_type":"BR_CPF",
  280. "tax_id":"22988294895",
  281. "country_code":"BR"
  282. }
  283. },
  284. "transactions":[
  285. {
  286. "amount":{
  287. "total":"200.00",
  288. "currency":"BRL",
  289. "details":{
  290. "subtotal":"190.00",
  291. "shipping":"10.00"
  292. }
  293. },
  294. "payee":{
  295. "merchant_id":"S2L47VGNDTVQA",
  296. "email":"rest_br@merchant.com.br"
  297. },
  298. "description":"Payment description",
  299. "item_list":{
  300. "items":[
  301. {
  302. "name":"Produto",
  303. "sku":"123",
  304. "price":"190.00",
  305. "currency":"BRL",
  306. "quantity":1
  307. }
  308. ],
  309. "shipping_address":{
  310. "recipient_name":"arthur teste",
  311. "line1":"rua teste, 123, apt 123",
  312. "line2":"bairro",
  313. "city":"cidade",
  314. "state":"estado",
  315. "postal_code":"01317000",
  316. "country_code":"BR",
  317. "normalization_status":"UNKNOWN"
  318. },
  319. "shipping_phone_number":"(99) 9999-9999"
  320. },
  321. "related_resources":[
  322. {
  323. "sale":{
  324. "id":"0GS97263XS487210W",
  325. "state":"pending",
  326. "amount":{
  327. "total":"200.00",
  328. "currency":"BRL",
  329. "details":{
  330. "subtotal":"190.00",
  331. "shipping":"10.00"
  332. }
  333. },
  334. "payment_mode":"INSTANT_TRANSFER",
  335. "reason_code":"PAYMENT_REVIEW",
  336. "protection_eligibility":"INELIGIBLE",
  337. "transaction_fee":{
  338. "value":"16.80",
  339. "currency":"BRL"
  340. },
  341. "receipt_id":"285566445071893",
  342. "parent_payment":"PAY-38703188CD323870ALMWVDJA",
  343. "create_time":"2018-06-22T19:47:26Z",
  344. "update_time":"2018-06-22T19:47:26Z",
  345. "links":[
  346. {
  347. "href":"https://api.sandbox.paypal.com/v1/payments/sale/0GS97263XS487210W",
  348. "rel":"self",
  349. "method":"GET"
  350. },
  351. {
  352. "href":"https://api.sandbox.paypal.com/v1/payments/sale/0GS97263XS487210W/refund",
  353. "rel":"refund",
  354. "method":"POST"
  355. },
  356. {
  357. "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-38703188CD323870ALMWVDJA",
  358. "rel":"parent_payment",
  359. "method":"GET"
  360. }
  361. ],
  362. "soft_descriptor":"PAYPAL *MERCHANTBRA"
  363. }
  364. }
  365. ]
  366. }
  367. ],
  368. "create_time":"2018-06-22T19:47:27Z",
  369. "links":[
  370. {
  371. "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-38703188CD323870ALMWVDJA",
  372. "rel":"self",
  373. "method":"GET"
  374. }
  375. ]
  376. }
  377.  
  378. 4. REQUEST (essa API não tem payload)
  379. {}
  380.  
  381. 4. RESPONSE
  382.  
  383. {
  384. "id":"PAY-38703188CD323870ALMWVDJA",
  385. "intent":"sale",
  386. "state":"approved",
  387. "cart":"9XD36955968007920",
  388. "payer":{
  389. "payment_method":"paypal",
  390. "status":"UNVERIFIED",
  391. "payer_info":{
  392. "email":"apuhlmann@paypal.com",
  393. "first_name":"arthur",
  394. "last_name":"teste",
  395. "payer_id":"TXZZBZMT6FSMN",
  396. "shipping_address":{
  397. "recipient_name":"arthur teste",
  398. "line1":"rua teste, 123, apt 123",
  399. "line2":"bairro",
  400. "city":"cidade",
  401. "state":"estado",
  402. "postal_code":"01317000",
  403. "country_code":"BR"
  404. },
  405. "phone":"11986800381",
  406. "country_code":"BR"
  407. }
  408. },
  409. "transactions":[
  410. {
  411. "amount":{
  412. "total":"200.00",
  413. "currency":"BRL",
  414. "details":{
  415. "subtotal":"190.00",
  416. "shipping":"10.00"
  417. }
  418. },
  419. "payee":{
  420. "merchant_id":"S2L47VGNDTVQA"
  421. },
  422. "description":"Payment description",
  423. "soft_descriptor":"PAYPAL *MERCHANTBRA",
  424. "item_list":{
  425. "items":[
  426. {
  427. "name":"Produto",
  428. "sku":"123",
  429. "price":"190.00",
  430. "currency":"BRL",
  431. "tax":"0.00",
  432. "quantity":1
  433. }
  434. ],
  435. "shipping_address":{
  436. "recipient_name":"arthur teste",
  437. "line1":"rua teste, 123, apt 123",
  438. "line2":"bairro",
  439. "city":"cidade",
  440. "state":"estado",
  441. "postal_code":"01317000",
  442. "country_code":"BR"
  443. }
  444. },
  445. "related_resources":[
  446. {
  447. "sale":{
  448. "id":"0GS97263XS487210W",
  449. "state":"pending",
  450. "amount":{
  451. "total":"200.00",
  452. "currency":"BRL",
  453. "details":{
  454. "subtotal":"190.00",
  455. "shipping":"10.00"
  456. }
  457. },
  458. "payment_mode":"INSTANT_TRANSFER",
  459. "reason_code":"PAYMENT_REVIEW",
  460. "protection_eligibility":"INELIGIBLE",
  461. "transaction_fee":{
  462. "value":"16.80",
  463. "currency":"BRL"
  464. },
  465. "receipt_id":"285566445071893",
  466. "parent_payment":"PAY-38703188CD323870ALMWVDJA",
  467. "create_time":"2018-06-22T19:47:26Z",
  468. "update_time":"2018-06-22T19:47:26Z",
  469. "links":[
  470. {
  471. "href":"https://api.sandbox.paypal.com/v1/payments/sale/0GS97263XS487210W",
  472. "rel":"self",
  473. "method":"GET"
  474. },
  475. {
  476. "href":"https://api.sandbox.paypal.com/v1/payments/sale/0GS97263XS487210W/refund",
  477. "rel":"refund",
  478. "method":"POST"
  479. },
  480. {
  481. "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-38703188CD323870ALMWVDJA",
  482. "rel":"parent_payment",
  483. "method":"GET"
  484. }
  485. ],
  486. "soft_descriptor":"PAYPAL *MERCHANTBRA"
  487. }
  488. }
  489. ]
  490. }
  491. ],
  492. "create_time":"2018-06-22T19:44:36Z",
  493. "links":[
  494. {
  495. "href":"https://api.sandbox.paypal.com/v1/payments/payment/PAY-38703188CD323870ALMWVDJA",
  496. "rel":"self",
  497. "method":"GET"
  498. }
  499. ]
  500. }
  501.  
  502.  
  503. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  504.  
  505. Compra À VISTA / COM desconto:
  506.  
  507. 1. /payment POST
  508. 2. /payment GET
  509. 3. /execute
  510. 4. /payment GET
  511.  
  512. 1. REQUEST
  513.  
  514. {
  515. "intent": "sale",
  516. "payer": {
  517. "payment_method": "paypal"
  518. },
  519. "redirect_urls": {
  520. "return_url": "http://www.paypal.com",
  521. "cancel_url": "http://www.paypal.com"
  522. },
  523. "application_context": {
  524. "locale": "pt-BR",
  525. "brand_name": "Nome Loja",
  526. "shipping_preference": "SET_PROVIDED_ADDRESS"
  527. },
  528. "transactions": [
  529. {
  530. "amount": {
  531. "currency": "BRL",
  532. "total": "200.00",
  533. "details": {
  534. "shipping": "10.00",
  535. "subtotal": "190.00"
  536. }
  537. },
  538. "item_list": {
  539. "items": [
  540. {
  541. "name": "Produto",
  542. "currency": "BRL",
  543. "sku": "123",
  544. "quantity": "1",
  545. "price": "190.00"
  546. }
  547. ],
  548. "shipping_address": {
  549. "city": "cidade",
  550. "country_code": "BR",
  551. "postal_code": "01317000",
  552. "line1": "rua teste, 123, apt 123",
  553. "line2": "bairro",
  554. "state": "estado",
  555. "phone": "(99) 9999-9999"
  556. }
  557. },
  558. "description": "Payment description",
  559. "notify_url": "https://endpoint.com/ppplus",
  560. "payment_options": {
  561. "allowed_payment_method": "IMMEDIATE_PAY"
  562. }
  563. }
  564. ]
  565. }
  566.  
  567. 1. RESPONSE
  568.  
  569. {
  570. "id": "PAY-6B031060AS635653GLMWWLPA",
  571. "intent": "sale",
  572. "state": "created",
  573. "payer": {
  574. "payment_method": "paypal"
  575. },
  576. "transactions": [
  577. {
  578. "amount": {
  579. "total": "200.00",
  580. "currency": "BRL",
  581. "details": {
  582. "subtotal": "190.00",
  583. "shipping": "10.00"
  584. }
  585. },
  586. "description": "Payment description",
  587. "payment_options": {
  588. "allowed_payment_method": "IMMEDIATE_PAY",
  589. "recurring_flag": false,
  590. "skip_fmf": false
  591. },
  592. "item_list": {
  593. "items": [
  594. {
  595. "name": "Produto",
  596. "sku": "123",
  597. "price": "190.00",
  598. "currency": "BRL",
  599. "quantity": 1
  600. }
  601. ],
  602. "shipping_address": {
  603. "line1": "rua teste, 123, apt 123",
  604. "line2": "bairro",
  605. "city": "cidade",
  606. "state": "estado",
  607. "postal_code": "01317000",
  608. "country_code": "BR",
  609. "phone": "(99) 9999-9999"
  610. }
  611. },
  612. "related_resources": [],
  613. "notify_url": "https://endpoint.com/ppplus"
  614. }
  615. ],
  616. "create_time": "2018-06-22T21:10:20Z",
  617. "links": [
  618. {
  619. "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-6B031060AS635653GLMWWLPA",
  620. "rel": "self",
  621. "method": "GET"
  622. },
  623. {
  624. "href": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-51663026RS606944Y",
  625. "rel": "approval_url",
  626. "method": "REDIRECT"
  627. },
  628. {
  629. "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-6B031060AS635653GLMWWLPA/execute",
  630. "rel": "execute",
  631. "method": "POST"
  632. }
  633. ]
  634. }
  635.  
  636. 2. REQUEST (essa API não tem payload)
  637. {}
  638.  
  639. 2. RESPONSE
  640.  
  641. {
  642. "id": "PAY-6B031060AS635653GLMWWLPA",
  643. "intent": "sale",
  644. "state": "created",
  645. "cart": "51663026RS606944Y",
  646. "transactions": [
  647. {
  648. "amount": {
  649. "total": "200.00",
  650. "currency": "BRL",
  651. "details": {
  652. "subtotal": "190.00",
  653. "shipping": "10.00"
  654. }
  655. },
  656. "payee": {
  657. "merchant_id": "S2L47VGNDTVQA",
  658. "email": "rest_br@merchant.com.br"
  659. },
  660. "description": "Payment description",
  661. "item_list": {
  662. "items": [
  663. {
  664. "name": "Produto",
  665. "sku": "123",
  666. "price": "190.00",
  667. "currency": "BRL",
  668. "quantity": 1
  669. }
  670. ],
  671. "shipping_address": {
  672. "line1": "rua teste, 123, apt 123",
  673. "line2": "bairro",
  674. "city": "cidade",
  675. "state": "estado",
  676. "postal_code": "01317000",
  677. "country_code": "BR",
  678. "normalization_status": "UNNORMALIZED"
  679. },
  680. "shipping_phone_number": "(99) 9999-9999"
  681. },
  682. "related_resources": [],
  683. "notify_url": "https://endpoint.com/ppplus"
  684. }
  685. ],
  686. "redirect_urls": {
  687. "return_url": "http://www.paypal.com/?paymentId=PAY-6B031060AS635653GLMWWLPA",
  688. "cancel_url": "http://www.paypal.com"
  689. },
  690. "create_time": "2018-06-22T21:10:20Z",
  691. "update_time": "2018-06-22T21:11:04Z",
  692. "links": [
  693. {
  694. "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-6B031060AS635653GLMWWLPA",
  695. "rel": "self",
  696. "method": "GET"
  697. },
  698. {
  699. "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-6B031060AS635653GLMWWLPA/execute",
  700. "rel": "execute",
  701. "method": "POST"
  702. },
  703. {
  704. "href": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-51663026RS606944Y",
  705. "rel": "approval_url",
  706. "method": "REDIRECT"
  707. }
  708. ]
  709. }
  710.  
  711. 3. REQUEST
  712.  
  713. {
  714. "payer_id": "TXZZBZMT6FSMN"
  715. }
  716.  
  717. 3. RESPONSE
  718.  
  719. {
  720. "id": "PAY-6B031060AS635653GLMWWLPA",
  721. "intent": "sale",
  722. "state": "approved",
  723. "cart": "51663026RS606944Y",
  724. "payer": {
  725. "payment_method": "paypal",
  726. "status": "UNVERIFIED",
  727. "payer_info": {
  728. "email": "apuhlmann@paypal.com",
  729. "first_name": "arthur",
  730. "last_name": "teste",
  731. "payer_id": "TXZZBZMT6FSMN",
  732. "shipping_address": {
  733. "recipient_name": "arthur teste",
  734. "line1": "rua teste, 123, apt 123",
  735. "line2": "bairro",
  736. "city": "cidade",
  737. "state": "estado",
  738. "postal_code": "01317000",
  739. "country_code": "BR",
  740. "normalization_status": "UNKNOWN"
  741. },
  742. "tax_id_type": "BR_CPF",
  743. "tax_id": "22988294895",
  744. "country_code": "BR"
  745. }
  746. },
  747. "transactions": [
  748. {
  749. "amount": {
  750. "total": "180.00",
  751. "currency": "BRL",
  752. "details": {
  753. "subtotal": "190.00",
  754. "shipping": "10.00"
  755. }
  756. },
  757. "payee": {
  758. "merchant_id": "S2L47VGNDTVQA",
  759. "email": "rest_br@merchant.com.br"
  760. },
  761. "description": "Payment description",
  762. "item_list": {
  763. "items": [
  764. {
  765. "name": "Produto",
  766. "sku": "123",
  767. "price": "190.00",
  768. "currency": "BRL",
  769. "quantity": 1
  770. }
  771. ],
  772. "shipping_address": {
  773. "recipient_name": "arthur teste",
  774. "line1": "rua teste, 123, apt 123",
  775. "line2": "bairro",
  776. "city": "cidade",
  777. "state": "estado",
  778. "postal_code": "01317000",
  779. "country_code": "BR",
  780. "normalization_status": "UNKNOWN"
  781. },
  782. "shipping_phone_number": "(99) 9999-9999"
  783. },
  784. "related_resources": [
  785. {
  786. "sale": {
  787. "id": "76L78468BE596852A",
  788. "state": "pending",
  789. "amount": {
  790. "total": "180.00",
  791. "currency": "BRL",
  792. "details": {
  793. "subtotal": "190.00",
  794. "shipping": "10.00"
  795. }
  796. },
  797. "payment_mode": "INSTANT_TRANSFER",
  798. "reason_code": "PAYMENT_REVIEW",
  799. "protection_eligibility": "INELIGIBLE",
  800. "transaction_fee": {
  801. "value": "6.52",
  802. "currency": "BRL"
  803. },
  804. "receipt_id": "2010432522711430",
  805. "parent_payment": "PAY-6B031060AS635653GLMWWLPA",
  806. "create_time": "2018-06-22T21:15:42Z",
  807. "update_time": "2018-06-22T21:15:42Z",
  808. "links": [
  809. {
  810. "href": "https://api.sandbox.paypal.com/v1/payments/sale/76L78468BE596852A",
  811. "rel": "self",
  812. "method": "GET"
  813. },
  814. {
  815. "href": "https://api.sandbox.paypal.com/v1/payments/sale/76L78468BE596852A/refund",
  816. "rel": "refund",
  817. "method": "POST"
  818. },
  819. {
  820. "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-6B031060AS635653GLMWWLPA",
  821. "rel": "parent_payment",
  822. "method": "GET"
  823. }
  824. ],
  825. "soft_descriptor": "PAYPAL *MERCHANTBRA"
  826. }
  827. }
  828. ]
  829. }
  830. ],
  831. "create_time": "2018-06-22T21:15:43Z",
  832. "links": [
  833. {
  834. "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-6B031060AS635653GLMWWLPA",
  835. "rel": "self",
  836. "method": "GET"
  837. }
  838. ]
  839. }
  840.  
  841. 4. REQUEST (essa API não tem payload)
  842. {}
  843.  
  844. 4. RESPONSE
  845.  
  846. {
  847. "id": "PAY-6B031060AS635653GLMWWLPA",
  848. "intent": "sale",
  849. "state": "approved",
  850. "cart": "51663026RS606944Y",
  851. "payer": {
  852. "payment_method": "paypal",
  853. "status": "UNVERIFIED",
  854. "payer_info": {
  855. "email": "apuhlmann@paypal.com",
  856. "first_name": "arthur",
  857. "last_name": "teste",
  858. "payer_id": "TXZZBZMT6FSMN",
  859. "shipping_address": {
  860. "recipient_name": "arthur teste",
  861. "line1": "rua teste, 123, apt 123",
  862. "line2": "bairro",
  863. "city": "cidade",
  864. "state": "estado",
  865. "postal_code": "01317000",
  866. "country_code": "BR"
  867. },
  868. "phone": "1128999120",
  869. "country_code": "BR"
  870. }
  871. },
  872. "transactions": [
  873. {
  874. "amount": {
  875. "total": "180.00",
  876. "currency": "BRL",
  877. "details": {
  878. "subtotal": "190.00",
  879. "shipping": "10.00"
  880. }
  881. },
  882. "payee": {
  883. "merchant_id": "S2L47VGNDTVQA"
  884. },
  885. "description": "Payment description",
  886. "soft_descriptor": "PAYPAL *MERCHANTBRA",
  887. "item_list": {
  888. "items": [
  889. {
  890. "name": "Produto",
  891. "sku": "123",
  892. "price": "190.00",
  893. "currency": "BRL",
  894. "tax": "0.00",
  895. "quantity": 1
  896. }
  897. ],
  898. "shipping_address": {
  899. "recipient_name": "arthur teste",
  900. "line1": "rua teste, 123, apt 123",
  901. "line2": "bairro",
  902. "city": "cidade",
  903. "state": "estado",
  904. "postal_code": "01317000",
  905. "country_code": "BR"
  906. }
  907. },
  908. "related_resources": [
  909. {
  910. "sale": {
  911. "id": "76L78468BE596852A",
  912. "state": "pending",
  913. "amount": {
  914. "total": "180.00",
  915. "currency": "BRL",
  916. "details": {
  917. "subtotal": "190.00",
  918. "shipping": "10.00"
  919. }
  920. },
  921. "payment_mode": "INSTANT_TRANSFER",
  922. "reason_code": "PAYMENT_REVIEW",
  923. "protection_eligibility": "INELIGIBLE",
  924. "transaction_fee": {
  925. "value": "6.52",
  926. "currency": "BRL"
  927. },
  928. "receipt_id": "2010432522711430",
  929. "parent_payment": "PAY-6B031060AS635653GLMWWLPA",
  930. "create_time": "2018-06-22T21:15:42Z",
  931. "update_time": "2018-06-22T21:15:42Z",
  932. "links": [
  933. {
  934. "href": "https://api.sandbox.paypal.com/v1/payments/sale/76L78468BE596852A",
  935. "rel": "self",
  936. "method": "GET"
  937. },
  938. {
  939. "href": "https://api.sandbox.paypal.com/v1/payments/sale/76L78468BE596852A/refund",
  940. "rel": "refund",
  941. "method": "POST"
  942. },
  943. {
  944. "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-6B031060AS635653GLMWWLPA",
  945. "rel": "parent_payment",
  946. "method": "GET"
  947. }
  948. ],
  949. "soft_descriptor": "PAYPAL *MERCHANTBRA"
  950. }
  951. }
  952. ]
  953. }
  954. ],
  955. "create_time": "2018-06-22T21:10:20Z",
  956. "links": [
  957. {
  958. "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-6B031060AS635653GLMWWLPA",
  959. "rel": "self",
  960. "method": "GET"
  961. }
  962. ]
  963. }
Add Comment
Please, Sign In to add comment